Skip to content

Instantly share code, notes, and snippets.

@tabvn
Last active November 9, 2018 10:23
Show Gist options
  • Select an option

  • Save tabvn/9f5a6d0ea4d8d2103200dfcdd701c5a4 to your computer and use it in GitHub Desktop.

Select an option

Save tabvn/9f5a6d0ea4d8d2103200dfcdd701c5a4 to your computer and use it in GitHub Desktop.

LiveX Dashboard Local Development environment

Download

  • Checkout source code at bitbucket
git clone https://[email protected]/tabvn/livex_dashboard.git

If you have ssh key access to the folder in reposity you can clone use ssh

git clone [email protected]:tabvn/livex_dashboard.git

Installation

  • After finish downloading source files we should have api, app, service
  • Api is for backend it use lookback framework. (Node.js) and database is Mongodb
  • Make sure you have installed mongodb on your own computer. See the documentation how to install MongoDB https://docs.mongodb.com/manual/installation/

Start Api

Install dependences packages

cd api
npm install

To start api

node .

default port of api will use port 3000 , make sure you dont have another program using this port. (like react app)

browse api explorer at: http://127.0.0.1:3000/explorer/

To use auto reload in development you can use nodemon

npm install -g nodemon

Then start api use nodemon like this

nodemon .

Api configuration files

By default in development mode all configs files in /server/config.json

on the server is runing in production mode (npm run start) it will use /server/config-production.json so make sure you change configuration correctly if needed.

Files customizations

Api core is using loopback framework so dont need modify the core . i did create custom models files in

common/models
common/mixins

Checkout LoopBack api https://loopback.io/doc/en/lb3/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment