MongoDB, Expressjs, React, Nodejs
MERN is a fullstack implementation in MongoDB, Expressjs, React, Nodejs.
MERN stack is the idea of using Javascript/Node for fullstack web development.
$ git clone https://github.com/NickError404/CrudFullStack-Car-Shop.git
$ yarn # or npm i
package.json
frontend/
package.json
api/
.env (to create .env, check [prepare your secret session])
package.json
...
notice, you need client and server runs concurrently in different terminal session, in order to make them talk to each other
$ cd api // go to api
$ npm i // npm install packages
$ npm run dev // run Api
// deployment for client app
$ npm run build // this will compile the react code using webpack and generate a folder called docs in the root level
$ npm run start // this will run the files in docs, this behavior is exactly the same how gh-pages will run your static site
$ cd frontend // go to server folder
$ npm i // npm install packages
$ npm run dev // run it locally
$ npm run build // this will build the server code to es5 js codes and generate a dist file
Client-side | Server-side |
---|---|
axios: ^0.27.2 | bcrypt-nodejs: ^0.0.3 |
babel-preset-stage-1: ^6.1.18 | body-parser: ^1.15.2 |
lodash: ^3.10.1 | cors: ^2.8.5 |
react: ^16.2.0 | dotenv: ^2.0.0 |
react-dom: ^18.2.0 | express: ^4.14.0 |
react-router-dom: ^6.7.2 | mongoose: ^4.7.4 |
redux: ^3.7.2 | morgan: ^1.7.0 |