cozyazure / leaflet-overlay

An experimental project to overlay an image on leaflet and interact with it
0 stars 0 forks source link

leaflet-overlay

An experimental project to overlay an image on leaflet and interact with it

Requirements

You will need the following tools to develop the project.

  1. nodejs, of version v6.9.1
  2. npm, of version 3.10.8
  3. bower, of version 1.8.0
  4. PostgreSQL, of version 9.6.1

Clone the project

$ git clone git@github.com:cozyazure/leaflet-overlay.git
$ cd leaflet-overlay

Install the node_modules

$ npm install

Install the bower modules

$ bower install

Init the database

Run the following command to init the database schema. Note that this will drop the current database, if it exists.

$ psql -f config/initdb.sql

Afterwhich, you would want to set the password at config/db_connection.js to your own PostgreSQL password.

var devDbPassword = "password"; //change to your own password

Run the server in development mode

$ npm run dev

Alternatively, more manual approach:

$ NODE_ENV=development nodemon bin/www

or using plain node:

$ NODE_ENV=development node bin/www

Press ctrl-c to terminate the server.

Run the server in Production mode

To run project in Production environment with forever:

npm install -g forever

Run the server in Production mode.

$ NODE_ENV=production npm start