Originated from: https://github.com/peggyrayzis/redux-to-graphql
View the application Go to a specific reddit
Ultra high performance progressive web application built with React + Reason (with hooks) and Next.js.
- Progressive web app
- offline
- install prompts on supported platforms
- Server side rendering
- Next.js 9 (canary)
- Webpack 4.x
- Babel 7.x
- Now.sh 2.x
- Reason React (latest release with hooks)
- Yarn (monorepo with workspaces)
- A production build is deployed from a merge to master
- A staging build is deployed from a PR against master
First of all make sure you are using node 10.15.3 (any node 10.x would also do) and latest yarn, you can always have a look at the engines section of the package.json. Why node 8.10. We are using Now.sh to make the app available online and underneath it's using AWS lambda and you have to use Node 8.
$ yarn (install)
$ yarn devAfter doing this, you'll have a server with hot-reloading running at http://localhost:3000 and a graphql server running at http://localhost:3000/api/graphql.
$ yarn dev
$ yarn update-graphql-schemaGo install this plugin from the vscode market: here. The plugin is called reason-vscode from Jared Forsyth. For more editors go see this guide.
We don't want to use snapshots, we use also use react-testing-library to avoid having to use enzyme and to enforce best test practices.
$ yarn format
$ yarn typecheck
$ yarn lint
$ yarn testor
$ yarn ciIf you have any issue while running this sample app, open an issue or often just running yarn clean && yarn build:reason will help resolve issues.
We use cypress. Please check e2e for more details.
If you wan to add a new test use the following command and wait for cypress to open
yarn e2e-build
yarn start
yarn workspace @dblechoc/e2e cypress open
This is where we list all our components (comes with hot reloading)
$ yarn storybookAfter doing this, you'll have a showcase page running at http://localhost:6006
We are using Github Actions.
# force a deploy
$ yarn now
# check all running instances
$ yarn now ls
# check logs for a given instance
$ yarn now logs reason-graphql-demo.now.sh --all