Skip to content

Puesta en marcha

Alberto edited this page Sep 10, 2017 · 4 revisions

Ficheros

Crear la base de datos:

$ mongorestore -d dbNameYouWant /path/where/is/groceryApp/install/database/test/
use dbNameYouWant
db.createUser(
    {
      user: "groceryUser",
      pwd: "groceryPassword",
      roles: [
         { role: "readWrite", db: "Items" }
      ]
    }
)

Configurar servidor con la base de datos: /path/where/is/groceryApp/server/datasources.json

{
  "db": {
    "host": "127.0.0.1",
    "port": 27017,
    "database": "mongoDBDatabase",
    "username": "mongoDBUser",
    "password": "mongoDBPassword",
    "name": "db",
    "connector": "mongodb"
  }
}

Arrancar proceso

  1. Base de datos:
$ sudo mongod
  1. Servidor loopBack
$ cd /path/where/is/groceryApp/
$ npm start
  1. Cliente Angular 4
$ cd /folder/where/is/groceryApp/client/
$ ng serve

Acceder a http://127.0.0.1:4200/

Clone this wiki locally