https://github.com/fortechromania/express-mongo-example-project
Example project of how to structure a basic express app with mongo
https://github.com/fortechromania/express-mongo-example-project
Last synced: 2 months ago
JSON representation
Example project of how to structure a basic express app with mongo
- Host: GitHub
- URL: https://github.com/fortechromania/express-mongo-example-project
- Owner: FortechRomania
- License: gpl-3.0
- Created: 2017-07-26T08:13:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-16T08:38:51.000Z (5 months ago)
- Last Synced: 2025-03-30T21:06:30.347Z (3 months ago)
- Language: JavaScript
- Size: 402 KB
- Stars: 51
- Watchers: 16
- Forks: 41
- Open Issues: 36
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This project is an application skeleton for a typical [Node.js](https://nodejs.org/) web app.
[](https://travis-ci.org/FortechRomania/express-mongo-example-project)
## Getting Started
To get you started you can simply clone the repository:```
git clone https://github.com/FortechRomania/express-mongo-example-project
```
and install the dependencies
```
npm install
```### Prerequisites
You need git to clone the repository. You can get git from
[http://git-scm.com/](http://git-scm.com/).A number of node.js tools is necessary to initialize and test the project. You must have node.js and its package manager (npm) installed. You can get them from [http://nodejs.org/](http://nodejs.org/). The tools/modules used in this project are listed in package.json and include express, mongodb and mongoose.
#### MongoDB
The project uses MongoDB as a database. If you are on Mac and using Homebrew package manager the installation is as simple as `brew install mongodb`.#### Apidoc
To install run `npm install apidoc -g`.### Start the MongoDB server
First we need to create the `db` directory where the database files will live in. In your terminal navigate to the `root` of your system by doing `cd ..` until you reach the top directory. You can create the directory by running `sudo mkdir -p /data/db`. Now open a different tab in your terminal and run `mongod` to start the Mongo server.### Run the Application
The project is preconfigured with a simple development web server. The simplest way to start this server is:
npm start
### Generate API documentation
npm run doc
The command will generate a /doc folder that will contain an index.html file. Open it in any browser. The file contains information about API routes.
### Project Structure
*Under Construction*