项目作者: andrzejdus

项目描述 :
Client & server for parking space occupancy sensors
高级语言: JavaScript
项目地址: git://github.com/andrzejdus/parking-space-occupancy-web.git
创建时间: 2017-01-20T23:38:43Z
项目社区:https://github.com/andrzejdus/parking-space-occupancy-web

开源协议:MIT License

下载


Build Status
dependencies Status

Parking Space Occupancy Sensors Web Client & Server

Web client & server for parking space occupancy sensors. This is a companion app for NodeMCU based esp8266 app.

Global dependecies

  • node
  • npm
  • PostgreSQL
  • Sentry (optional)

How to run it

Development

  • make sure that NODE_ENV is set to development
    1. cp .env-example .env
    2. vim .env
    3. npm install
    4. npm start
    Now you can open http://localhost:8080 to view the app in the browser.

Production

  • make sure that NODE_ENV is set to production
    1. npm install
    2. npm start
    Node.js app will serve static content (from dist directory), respond to API endpoints and communicate with client using socket.io.

Scripts

npm start

Runs the app in the development or production mode (depending on NODE_ENV).

Open http://localhost:8080 to view it in the browser.

In production mode only Node.JS server is started.
In development webpack, which proxies requests to node server, is started too.

watch

build

build-dev

create-tables

Main modules

  • Client - React app that shows current parking sensor status
  • Server - Node.js API & web server