Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

node-express-mongoose

> 后端框架
Open source

A boilerplate application for building web apps using node and mongodb

1.4K stars0 likes1 views
WebsiteGitHub

About

A boilerplate application for building web apps using node and mongodb

Node Express Mongoose

A boilerplate application for building web apps using express, mongoose and passport.

Read the wiki to understand how the application is structured.

Usage

bash
git clone https://github.com/madhums/node-express-mongoose.git
cd node-express-mongoose
npm install
cp .env.example .env
npm start

Checkout the apps that are built using this approach

Docker

You can also use docker for development. Make sure you run npm install on your host machine so that code linting and everything works fine.

bash
npm i
cp .env.example .env

Start the services

bash
docker-compose up -d

View the logs

bash
docker-compose logs -f

In case you install a npm module while developing, it should also be installed within docker container, to do this first install the module you want with simple npm i module name, then run it within docker container

bash
docker-compose exec node npm i

If you make any changes to the file, nodemon should automatically pick up and restart within docker (you can see this in the logs)

To run tests

bash
docker-compose exec -e MONGODB_URL=mongodb://mongo:27017/noobjs_test node npm test

Note that we are overriding the environment variable set in .env file because we don't want our data erased by the tests.

Note: The difference between exec and run is that, exec executes the command within the running container and run will spin up a new container to run that command. So if you want to run only the tests without docker-compose up, you may do so by running docker-compose run -e MONGODB_URL=mongodb://mongo:27017/my_app_test node npm test

Deployment

If you want to deploy to heroku, you can follow this article

License

MIT

Issues· 11 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptboilerplateexpressmongoosenode

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架