Skip to content

Commit

Permalink
Add code for section 3 video “Setting up MongoDB and New Project Stru…
Browse files Browse the repository at this point in the history
…cture”
  • Loading branch information
Filip Danić committed Dec 8, 2018
1 parent 6873b3a commit 3750f57
Show file tree
Hide file tree
Showing 6 changed files with 4,331 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .gitignore
@@ -1,13 +1,13 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules
/server/node_modules

# testing
/coverage
/server/coverage

# production
/build
/server/build

# misc
.DS_Store
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions server/Dockerfile
@@ -0,0 +1,14 @@
# Example from https://github.com/docker/docker.github.io/blob/master/engine/examples/mongodb/Dockerfile

FROM ubuntu:16.04

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
RUN echo "deb http://repo.mongodb.org/apt/ubuntu $(cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d= -f2)/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list

RUN apt-get update && apt-get install -y mongodb-org

RUN mkdir -p /data/db

EXPOSE 27017

ENTRYPOINT ["/usr/bin/mongod"]
File renamed without changes.
8 changes: 5 additions & 3 deletions package.json → server/package.json
Expand Up @@ -2,11 +2,13 @@
"name": "hands-on-mern-stack-web-development",
"version": "1.0.0",
"description": "Hands-on MERN Stack Web Development [Video], published by Packt",
"main": "server/index.js",
"main": "index.js",
"author": "www.danicfilip.com",
"scripts": {
"start": "PORT=8055 nodemon --inspect ./server/index.js --exec babel-node",
"test": "jest"
"start": "PORT=8055 nodemon --inspect ./index.js --exec babel-node",
"test": "jest",
"db:create": "docker build . -t mongodb_dev",
"db:run": "docker run -p 27017:27017 --name mongodb_dev_instance -i -t mongodb_dev"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 3750f57

Please sign in to comment.