Skip to content

A simple demo app to capture the node-mongo-express ethos with Travis-CI

Notifications You must be signed in to change notification settings

leopoldodonnell/node-mongo-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Mongo Express

Build Status

Known Vulnerabilities

This project is a simplistic start for working with Node, Mongo and Express with CI using TravisCI and dependency Security with Snyk.

TODO: Add more discussion

TL;DR

  1. clone this repo
  2. cd node-mongo-express
  3. Install all the node modules: npm install
  4. Start up an instance of mongodb. The easiest way (if you have docker installed) is to use docker docker run --rm -d --name mongo-serv mongo this will startup mondb on its default port27017
  5. Create the database for the app: npm run makedb
  6. Run the server: npm run dev

On-going development with Docker

TODO: Add more discussion

If you haven't installed Node on your development machine, you can still develop using Docker. In this example you'll create a network for your containers to connect to, then run Mongo using a docker daemon and an interactive node shell container on your current directory to do your development.

  1. Create a docker network for node to talk to mongo
$ docker create network mongo-net
  1. Run an insecure mondodb instance that will dissappear on a kill
$ docker run --rm -d --name mongo-serv --network mongo-net mongo
  1. Run the node development container
$ docker run --rm -ti -v $PWD:/app -w /app --network mongo-net -p 3000:3000 node:slim /bin/bash
  1. Follow the steps above at TL;DR (replacing the mongodb startup with the one described in this section)

TravisCI integratin

TODO: Add more discussion

Update the github account and repository to display your TravisCI badge:

[![Build Status](https://travis-ci.org/{your-github-account}/{your-project-name}.svg?branch=master)](https://travis-ci.org/{your-github-account}/{your-project-name})

Snyk Integration

TODO: Add more discussion

Update the github account and repository to display your Snyk badge:

[![Known Vulnerabilities](https://snyk.io/test/github/{your-github-account}/{your-project-name}.svg)](https://snyk.io/test/github/{your-github-account}/{your-project-name})

About

A simple demo app to capture the node-mongo-express ethos with Travis-CI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published