Project

General

Profile

Actions

Feature #607

closed

Migrate www to NodeJS

Added by Hammel about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Monitor
Target version:
Start date:
19 Feb 2018
Due date:
% Done:

100%

Estimated time:
Severity:
03 - Medium

Description

The PoC was written in PHP based on the PiBox Web UI code. This worked, but it's a poor implementation going forward. Implementation on top of a nodejs with Restify will make it easier to implement a real REST API.

Create a stub service for both http and https based on the REST APIs implemented in NodeJS with Restify. Import as few 3rd party modules as possible!!

Here's an article on testing REST APIs with curl:
http://www.codingpedia.org/ama/how-to-test-a-rest-api-from-command-line-with-curl/

Actions #1

Updated by Hammel about 6 years ago

  • % Done changed from 0 to 30

I pushed the first stubbed services in nodejs. I'm updating the PiBox core development platform since it's been awhile since I last built it. And I'm adding nodejs to that build.

The Ironman www project now has both PHP and NodeJS versions of the server, with the latter being a little more complete. I need to finish porting what works to the new API structure in the REST server, then I can delete the old PHP server. After that I need to finish implementing the API for the monitor before moving on to the IoT and Jarvis sides.

I have a unit test framework implemented under the tests directory for testing what's there now, which is mostly just testing header handling.

Actions #2

Updated by Hammel about 6 years ago

  • Description updated (diff)
Actions #3

Updated by Hammel about 6 years ago

  • Severity changed from 01 - Critical to 03 - Medium
Actions #4

Updated by Hammel almost 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 30 to 100

The PHP interface is only used when in pairing mode. It is disabled when not in pairing mode.

While there is some value in porting the PHP to the NodeJS server, there is little need to rewrite this code now. It works as is and is good enough for MVP.

Closing issue.

Actions

Also available in: Atom PDF