Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abhimanusharma/mern-crud-app
Simple crud app using MERN Stack
https://github.com/abhimanusharma/mern-crud-app
crm crud expressjs mongodb reactjs
Last synced: 5 days ago
JSON representation
Simple crud app using MERN Stack
- Host: GitHub
- URL: https://github.com/abhimanusharma/mern-crud-app
- Owner: abhimanusharma
- Created: 2020-11-19T08:15:04.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-13T10:55:14.000Z (almost 4 years ago)
- Last Synced: 2024-11-02T22:05:32.108Z (13 days ago)
- Topics: crm, crud, expressjs, mongodb, reactjs
- Language: JavaScript
- Homepage:
- Size: 1.3 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Simple crud apis for simple CRM.
CRM is using express router and mongodb for database operations. To update or get configuration values refer .env file in the root location.### Directory Structure
- controllers/
- clientsController.js
- leadsController.js
- salesController.js
- models/
- client.js
- lead.js
- sale.js
- routes/
- clientRouter.js
- index.js
- leadRouter.js
- saleRouter.js
- views/
- public/
- src/
- components/
- Client.js
- Sale.js
- Lead.js
- App.js
- App.css
- index.js
- index.css
- package.json
- app.js
- package.json
- README.md
- .env### .env file
```
MONGO_DB_URL=mongodb://:/
SERVER_PORT=
```### New route
After creating new route file include it into routes/index.js### Run the app
To run the applcation make sure you have **nodejs** and **mongodb** installed locally.
Run `npm install` to install all the dependencies.
Run `npm run dev` to run the application### Mongodb database
After installing mongodb on your local machine or VM or docker create a database in it.
Run command `mongo` in the terminal. Then run `use ` where dbname is the name of your databse.
Update the databse name in the .env file **MONGO_DB_URL** variable.## Mongo db connection error on windows
1) mkdir c:\data
2) cd data
3) Run command `mongod -dbpath .`