This app is a simple listing of Rick and Morty characters.
To run the development server:
- Start by running
yarn install
on your terminal to install all dependencies - In the root directory, create a file for environment variables by running
cp .env.sample .env.local
- Open the newly-created
.env.local
file, and ensure that theGRAPHQL_ENDPOINT
environment variable points to the Rick & Morty GraphQL API (https://rickandmortyapi.com/graphql) - Generate GraphQL types by running
yarn codegen
- Run
yarn dev
to start the app
After following the instructions above, simply open http://localhost:3000
in your browser.
To run a production build, please follow steps 1-4 above, and then:
5. Build the app by running yarn build
6. Start the server by running yarn start
Just as with the dev server, you should then be able to open the app in your browser (http://localhost:3000)