Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork259
💥 A sophisticated GraphQL with Apollo, Express and PostgreSQL boilerplate project.
License
the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A full-fledged Apollo Server with Apollo Client starter project with React and Express.Read more about it in this tutorial to build it yourself.
Family of universal fullstack repositories:
Server Applications:
Client Applications:
- React (create-react-app) with Apollo Client
- Queries, Mutations, Subscriptions
- Node.js with Express and Apollo Server
- cursor-based Pagination
- PostgreSQL Database with Sequelize
- entities: users, messages
- Authentication
- powered by JWT and local storage
- Sign Up, Sign In, Sign Out
- Authorization
- protected endpoint (e.g. verify valid session)
- protected resolvers (e.g. e.g. session-based, role-based)
- protected routes (e.g. session-based, role-based)
- performance optimizations
- example of using Facebook's dataloader
- E2E testing
git clone git@github.com:the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate.gitcd fullstack-apollo-express-postgresql-boilerplatetouch .envnpm install- fill out.env file (see below)
- start PostgreSQL database
npm start- visit
http://localhost:8000for GraphQL playground
Since this boilerplate project is using PostgreSQL, you have to install it for your machine and get a database up and running. You find everything for the set up over here:Setup PostgreSQL with Sequelize in Express Tutorial. After you have created a database and a database user, you can fill out the environment variables in theserver/.env file.
DATABASE=mydatabaseDATABASE_USER=postgresDATABASE_PASSWORD=postgresSECRET=asdlplplfwfwefwekwself.2342.dawasdqTheSECRET is just a random string for your authentication. Keep all these information secure by adding the.env file to your.gitignore file. No third-party should have access to this information.
- adjust
test:run-servernpm script withTEST_DATABASEenvironment variable in package.json to match your testing database name- to match it from package.json:
createdb mytestdatabasewith psql
- to match it from package.json:
- one terminal: npm run test:run-server
- second terminal: npm run test:execute-test
- Don't missupcoming Tutorials and Courses
- Check out currentReact Courses
About
💥 A sophisticated GraphQL with Apollo, Express and PostgreSQL boilerplate project.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors9
Uh oh!
There was an error while loading.Please reload this page.