/SSNoC-Node

Node.js Front End Interface Project for the Survivable Social Network on a Chip project

Primary LanguageJavaScript

SSNoC User Interface

Introduction

  • This repository contains code for browser part and Node.js server part.

  • SSNoC UI communicate with SSNoC JavaWS to store and retrieve business logic.

  • SSNoC UI support real time notification, message passing and status updating.

UI System Architecture

Introduction

  • Front-end includes html5, css and javascript code to support platform independent redering.

  • Back-end includes Node.js and Socket.io to support http request/response handling and real time features.

Installation

Install Node.js from http://nodejs.org/
git clone https://github.com/cmusv-fse/SSNoC-Node-UI
sudo npm install -g express
sudo npm install
sudo npm install -g supervisor

Run Server

sudo supervisor server.js
  • To change the port on which node.js starts, please update line 21 of server.js file: app.set("port", 80); to provide the new port number.

  • To change the port on which node.js should communicate with Java WS - update the port number on line 1 of config/rest_api.js : var host_url = "http://localhost:1234/ssnoc";

Coding Style

Code

  • No trailing semicolons.
  • No trailing whitespace.
  • Space identation (no tabs)
  • 2 space ident
  • Keep lines fewer than 120 characters.
  • Always include a space before and after a function arrow.
  • In doubt refer to https://github.com/styleguide/javascript/1.0

Git usage