Installation is even easier now!

This commit is contained in:
Ben Elferink
2020-12-30 15:53:33 +02:00
parent ab6817973d
commit b2ae06f7cf
4 changed files with 16 additions and 19 deletions

View File

@@ -27,27 +27,17 @@ new repository.<br /> Then open your terminal and clone your repository:
### STEP 2: ### STEP 2:
Go to your client folder (frontend), and set your workspace: Go to your repository's folder, and install all dependecies:
> cd ~/Desktop/[your-repo-name]/client <br /> npm install <br /> npm start > cd ~/Desktop/[your-repo-name]<br /> npm install
```
We're unable to detect target browsers.
Would you like to add the defaults to your package.json? (Y/n)
```
> Y
<br /> <br />
### STEP 3: ### STEP 3:
Prepare your MongoDB database ([atlas](https://www.mongodb.com/cloud/atlas), Prepare your MongoDB database ([atlas](https://www.mongodb.com/cloud/atlas),
[community](<https://github.com/belferink1996/MERN-template/wiki/Install-MongoDB-Community-Server-(MacOS)>)),<br /> [community](<https://github.com/belferink1996/MERN-template/wiki/Install-MongoDB-Community-Server-(MacOS)>)).<br />
then go to your server folder (backend), and set your workspace: Then go to your server folder (backend), and set your database within `server.js`,
> cd ~/Desktop/[your-repo-name]/server <br /> npm install <br /> Set your database within
> `index.js`, then start server: npm start
<br /> <br />

View File

@@ -1,11 +1,10 @@
{ {
"name": "client", "name": "client",
"version": "0.1.0", "version": "1.0.0",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"start": "react-scripts start" "start": "react-scripts start"
}, },
"author": "Ben Elferink",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"axios": "^0.21.0", "axios": "^0.21.0",

9
package.json Normal file
View File

@@ -0,0 +1,9 @@
{
"name": "mern-application",
"version": "0.1.0",
"scripts": {
"install": "cd ./server && npm install && cd ./../client && npm install"
},
"author": "Ben Elferink",
"license": "ISC"
}

View File

@@ -1,12 +1,11 @@
{ {
"name": "server", "name": "server",
"version": "0.1.0", "version": "1.0.0",
"main": "server.js", "main": "server.js",
"type": "module", "type": "module",
"scripts": { "scripts": {
"start": "nodemon server.js || node server.js" "start": "nodemon server.js || node server.js"
}, },
"author": "Ben Elferink",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"cors": "^2.8.5", "cors": "^2.8.5",