AppServer is a node.js app which runs Anypixel apps from an Express server. This is what holds the canvas that your Anypixel app will draw on. Each frame it will send the pixel data from this canvas to ChromeBridge, where it will be sent on to the physical display itself. It also provides a RESTful API for changing the current app and for listing the available apps.
-
Install node components -
$ npm install
-
Start the server -
$ npm start
To stop the server, do $ npm stop
To add your own apps:
Copy your app folder into /public/apps
and make sure you have an index.js file in your root app directory.
Renders an HTML page containing the requested app.
-
URL:
/app/:app_name -
Method:
GET
-
URL Parameters:
app_name=[string]
-
Success Response:
- Code: 200
Content: Rendered EJS template HTML containing the requested app.
- Code: 200
-
Error Response:
- Code: 404
Content:Invalid app name
- Code: 404
Returns an array of the valid app names and directories
-
URL:
/api/apps -
Method:
GET
-
URL Parameters:
None -
Success Response:
- Code: 200
Content:
{ success: true, apps: [ { name: "My App", path: "myApp" } ] }
- Code: 200
-
Error Response:
None