• Stars
    star
    1,426
  • Rank 32,993 (Top 0.7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 11 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A boilerplate application for building web apps using node and mongodb

Build Status Dependencies Code Climate Gitter

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

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.

npm i
cp .env.example .env

Start the services

docker-compose up -d

View the logs

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

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

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

License

MIT

More Repositories

1

node-express-mongoose-demo

A simple demo app using node and mongodb for beginners (with docker)
JavaScript
5,120
star
2

node-imager

[not maintained anymore] A node.js module to resize, crop and upload images to Rackspace cloudfiles and Amazon S3
JavaScript
267
star
3

go-gin-mgo-demo

A demo CRUD application in golang using the popular gin-gonic framework
Go
161
star
4

node-notifier

A simple node.js module to handle all the application level notifications (apple push notifications and mails)
JavaScript
86
star
5

node-view-helpers

expressjs view helper methods
JavaScript
83
star
6

mongoose-migrate

mongodb migrations for node
JavaScript
67
star
7

node-genem

(not maintained) Opinionated MVC generator for NodeJS that uses express and mongoose.
JavaScript
54
star
8

mongoose-user

Some generic methods, statics and virtuals used for user schemas
JavaScript
47
star
9

lm.js

localStorage manager.
JavaScript
30
star
10

gedit3-plugins

gedit plugins compatible with v3
Python
6
star
11

go-martini-mgo-demo

A simple CRUD app in golang and mongodb using martini, mgo and godep
Go
5
star
12

ab

A boilerplate for building angular apps with bower, gulp, angular-ui, bootstrap and less.
JavaScript
5
star
13

tomdoc

modified version of tomdoc
Ruby
4
star
14

my-gedit-settings

My gedit2 plugins and configurations
Python
4
star
15

browserify-example

browserify example for building client side apps using ES6
JavaScript
4
star
16

mongoose-load-list

easy queries with mongoose
JavaScript
4
star
17

install-scripts

install libraries and softwares on a fresh ubuntu
Shell
3
star
18

geekhunt

Search for geeks on github
JavaScript
3
star
19

omniauth-on-heroku

Omniauth with authlogic on heroku
Ruby
3
star
20

reboil-demo

React boilerplate
JavaScript
3
star
21

gokoa-demo

A demo using koa and mongoose to build apis.
JavaScript
2
star
22

sublime-settings

my sublimetext settings
2
star
23

gokoa

A boilerplate for building web apps using koajs.
JavaScript
2
star
24

delete-blank-lines.tmbundle

delete blank lines textmate bundle
2
star
25

madhums.github.io

SCSS
2
star
26

imager-cli

cli for imager
JavaScript
1
star
27

ts-aggregate

A simple wrapper for aggregating time series data for mongodb.
JavaScript
1
star
28

browsetime

A chrome/brave extension to monitor how much time you spend on websites
JavaScript
1
star
29

dinner-quest-api

JavaScript
1
star
30

analyze-text

Analyze text using Sentiment Analysis
JavaScript
1
star
31

aj

Command to add .jshintrc
JavaScript
1
star
32

clean-linkedin-feed

A chrome/brave extension to hide social media content (images, videos, presentations and link previews) in linkedin feed.
JavaScript
1
star
33

nlib

CLI helper to set up new node library
JavaScript
1
star