|
4 | 4 |
|
5 | 5 | 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](https://www.robinwieruch.de/graphql-apollo-server-tutorial/). |
6 | 6 |
|
7 | | -**This repository is the fullstack Apollo Server with Express and MongoDB project. You can find a working client application that can be used with this server in the list below:** |
| 7 | +Further Readings: |
| 8 | + * [MongoDB Setup](https://www.robinwieruch.de/mongodb-express-setup-tutorial/) |
| 9 | + * [TODO: write migration tutorial] |
| 10 | + |
| 11 | +**Family of universal fullstack repositories:** |
| 12 | + |
| 13 | +Server Applications: |
| 14 | + |
| 15 | +* [Node.js with Express + MongoDB](https://github.com/the-road-to-graphql/fullstack-apollo-express-mongodb-boilerplate) |
| 16 | +* [Node.js with Express + PostgreSQL](https://github.com/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate) |
| 17 | + |
| 18 | +Client Applications: |
8 | 19 |
|
9 | 20 | * [React Client](https://github.com/the-road-to-graphql/fullstack-apollo-react-boilerplate) |
10 | 21 |
|
@@ -35,31 +46,26 @@ A full-fledged Apollo Server with Apollo Client starter project with React and E |
35 | 46 | * `npm install` |
36 | 47 | * fill out *.env file* (see below) |
37 | 48 | * `npm start` |
38 | | -* optional visit `http://localhost:8000` for GraphQL playground |
| 49 | +* [start MongoDB](https://www.robinwieruch.de/mongodb-express-setup-tutorial/) |
| 50 | +* visit `http://localhost:8000` for GraphQL playground |
39 | 51 |
|
40 | 52 | #### .env file |
41 | 53 |
|
42 | | -Since this boilerplate project is using MongoDB, 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 MongoDB with Mongoose in Express Tutorial](https://www.robinwieruch.de/mongodb-express-setup-tutorial) [TODO: write tutorial]. After you have created a database and a database user, you can fill out the environment variables in the *server/.env* file. |
| 54 | +Since this boilerplate project is using MongoDB, 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 MongoDB with Mongoose in Express Tutorial](https://www.robinwieruch.de/mongodb-express-setup-tutorial) [TODO: write setup tutorial]. After you have created a MongoDB database, you can fill out the environment variables in the *server/.env* file. |
43 | 55 |
|
44 | 56 | ``` |
45 | | -DATABASE=mydatabase |
46 | | -
|
47 | | -DATABASE_USER=postgres |
48 | | -DATABASE_PASSWORD=postgres |
49 | | -
|
50 | 57 | SECRET=asdlplplfwfwefwekwself.2342.dawasdq |
| 58 | +
|
| 59 | +DATABASE_URL=mongodb://localhost:27017/mydatabase |
51 | 60 | ``` |
52 | 61 |
|
53 | 62 | 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. |
54 | 63 |
|
55 | 64 | #### Testing |
56 | 65 |
|
57 | | -[TODO: change psql to MongoDB equivalent] |
58 | | - |
59 | | -* adjust `test:run-server` npm script with `TEST_DATABASE` environment variable in package.json to match your testing database name |
60 | | - * to match it from package.json: `createdb mytestdatabase` with psql |
| 66 | +* adjust `test:run-server` npm script with `TEST_DATABASE_URL` environment variable in package.json to match your testing database name |
61 | 67 | * one terminal: npm run test:run-server |
62 | | -* second terminal: test:execute-test |
| 68 | +* second terminal: npm run test:execute-test |
63 | 69 |
|
64 | 70 | ## Want to learn more about React + GraphQL + Apollo? |
65 | 71 |
|
|
0 commit comments