Skip to content

Commit ef29046

Browse files
authored
Merge pull request #4 from the-road-to-graphql/afaayerhan-mongodb-migration
Afaayerhan mongodb migration
2 parents 2d55156 + ae69bd2 commit ef29046

File tree

14 files changed

+508
-458
lines changed

14 files changed

+508
-458
lines changed

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@
44

55
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/).
66

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:
819

920
* [React Client](https://github.com/the-road-to-graphql/fullstack-apollo-react-boilerplate)
1021

@@ -35,31 +46,26 @@ A full-fledged Apollo Server with Apollo Client starter project with React and E
3546
* `npm install`
3647
* fill out *.env file* (see below)
3748
* `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
3951

4052
#### .env file
4153

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.
4355

4456
```
45-
DATABASE=mydatabase
46-
47-
DATABASE_USER=postgres
48-
DATABASE_PASSWORD=postgres
49-
5057
SECRET=asdlplplfwfwefwekwself.2342.dawasdq
58+
59+
DATABASE_URL=mongodb://localhost:27017/mydatabase
5160
```
5261

5362
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.
5463

5564
#### Testing
5665

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
6167
* one terminal: npm run test:run-server
62-
* second terminal: test:execute-test
68+
* second terminal: npm run test:execute-test
6369

6470
## Want to learn more about React + GraphQL + Apollo?
6571

0 commit comments

Comments
 (0)