This project is a wrapper information site for the official stars wars API, built using Apollo GraphQL server and React client.
- React
- Typescript
- GraphQL
- Nodejs
- Prisma
This project is a wrapper information site for the official stars wars API, built using Apollo GraphQL server and React client.
Clone this git repo.
-
Install and set up postgresql, if not already installed. You can visit this tutorial for information on how to install postgresql.
-
Create the database and take note of the credentials.
-
Create a file named
.env
in theserver
directory according to the.env-example
file, and add the relevant database credentials. -
To start the client, open the terminal and inside the project root folder type the following
cd client
yarn install
yarn start
- Open another tab in the terminal(CTRL+SHIFT+T) and type the following to run server
cd server
yarn install
npx prisma migrate dev --name init
yarn server
- The client site will open in the browser at http://localhost:3000/.
👤 Marylene Sawyer
- Github: @Bluette1
- Twitter: @MaryleneSawyer
- Linkedin: Marylene Sawyer
-
The content in this repository was retrieved from or inspired by the following sites
-
Icons
cd client && npm run build-deploy
cd server
- Initialize git heroku repo accorging to instructions
heroku run npx prisma db push --preview-feature
- Integrate with more API's
- Review and refurbish the styling
- Add more code testing
- Add more information/pages such as the user profile page
-
Both the code for the static and non-static site reside in one folder for this project
-
Deploying static site:
- Follow instructions in the Fly.io documention
-
Deploying non-static site:
- Remove the
Dockerfile
for deploying the static site (you can just temporarily rename it to something else) - Follow instructions in the Fly.io documention
- To make sure you're deploying the non-static and not the static site, run:
flyctl deploy --app starwars-api
, and vice-versa.
- To make sure you're deploying the non-static and not the static site, run:
- Remove the
Contributions, issues and feature requests are welcome!