Skip to content

DocAmaroo/mean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packages

npm i -g nodemon @angular/cli@latest

On /mean/api

npm i --save express mongodb mongoose body-parser cors dotenv

On /mean/front

npm i --save jquery bootstrap popper.js @fortawesome/fontawesome-free

Install MongoDB

Installation instruction here

Environnement file

# On /mean/api create a new .env file
touch .env
nano .env

# copy and paste this
PORT=8888
DB_CONNECTION=mongodb://localhost:27017/SUPERVENTES

Run scripts to create & add elements on database

#on /mean
./creationBase.sh

Angular.json

Add this lines on angular.json

//...
    "styles": [
      "src/styles.css",
      "node_modules/bootstrap/dist/css/bootstrap.min.css",
      "node_modules/@fortawesome/fontawesome-free/css/all.css"
    ],
    "scripts": [
      "node_modules/jquery/dist/jquery.min.js",
      "node_modules/popper.js/dist/umd/popper.js",
      "node_modules/bootstrap/dist/js/bootstrap.min.js"
    ]
//...

Start NodeJS Server

sudo systemctl start mongod
npm run dev

Start Angular

ng serve -o