-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- stable | ||
|
||
install: | ||
- npm install | ||
|
||
script: | ||
- npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
# fullstack-apollo-react-express-boilerplate-project | ||
# fullstack-apollo-react-boilerplate | ||
|
||
[](https://slack-the-road-to-learn-react.wieruch.com/) | ||
[](https://travis-ci.org/the-road-to-graphql/fullstack-apollo-react-boilerplate) [](https://slack-the-road-to-learn-react.wieruch.com/) | ||
|
||
A full-fledged Apollo Server 2 with Apollo Client 2 starter project with React, Express and PostgreSQL. | ||
A full-fledged Apollo Server 2 with Apollo Client 2 starter project with React and Express. [Read more about it in this tutorial to build it yourself](https://www.robinwieruch.de/graphql-apollo-server-tutorial/). | ||
|
||
[GraphQL Server Tutorial](https://www.robinwieruch.de/graphql-apollo-server-tutorial/) | ||
This is the client project which uses React. You can find various working server applications that can be used with this client. | ||
|
||
## Features | ||
* [PostgreSQL](https://github.com/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate) | ||
* [MongoDB](#) | ||
|
||
* React (create-react-app) with Apollo Client 2 | ||
## Features of Client + Server | ||
|
||
* React (create-react-app) with Apollo Client | ||
* Queries, Mutations, Subscriptions | ||
* Node.js with Express and Apollo Server 2 | ||
* Node.js with Express and Apollo Server | ||
* cursor-based Pagination | ||
* PostgreSQL Database with Sequelize | ||
* PostgreSQL Database with Sequelize or MongoDB | ||
* entities: users, messages | ||
* Authentication | ||
* powered by JWT and local storage | ||
|
@@ -27,45 +30,13 @@ A full-fledged Apollo Server 2 with Apollo Client 2 starter project with React, | |
|
||
## Installation | ||
|
||
* `git clone [email protected]:rwieruch/fullstack-apollo-react-express-boilerplate-project.git` | ||
* `cd fullstack-apollo-react-express-boilerplate-project` | ||
|
||
### Client | ||
|
||
* `cd client` | ||
* `git clone [email protected]:rthe-road-to-graphql/fullstack-apollo-react-boilerplate.git` | ||
* `cd fullstack-apollo-react-boilerplate` | ||
* `npm install` | ||
* `npm start` | ||
* visit `http://localhost:3000` | ||
|
||
### Server | ||
|
||
* `cd server` | ||
* `touch .env` | ||
* `npm install` | ||
* fill out *.env file* (see below) | ||
* `npm start` | ||
* optional visit `http://localhost:8000` for GraphQL playground | ||
|
||
#### .env file | ||
|
||
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](https://www.robinwieruch.de/postgres-express-setup-tutorial). After you have created a database and a database user, you can fill out the environment variables in the *server/.env* file. | ||
|
||
``` | ||
DATABASE=mydatabase | ||
DATABASE_USER=postgres | ||
DATABASE_PASSWORD=postgres | ||
SECRET=asdlplplfwfwefwekwself.2342.dawasdq | ||
``` | ||
|
||
The `SECRET` 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. | ||
|
||
#### Testing | ||
|
||
* adjust `test-server` npm script with `TEST_DATABASE` environment variable in package.json to match your testing database name | ||
* to match it from package.json: `createdb mytestdatabase` with psql | ||
* one terminal: npm run test-server | ||
* second terminal: npm run test | ||
See Server Installation instructions in the other GitHub repository. | ||
|
||
## Want to learn more about React + GraphQL + Apollo? | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters