Skip to content

Repo for tests with NodeJS on top of a Raspberry Pi 3 model B

License

Notifications You must be signed in to change notification settings

alanbueno/rasp-node-blink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rasp-node-blink

Basic Restfull API build on top of koa.js framework to handle a Raspberry Pi 3 model B with a expansion board

Ready, set, go!

Env File

Create a .env file (in the root of the project) with the env variables

    HOST=customHost (default: 0.0.0.0)
    PORT=customPort (default: 3001)
    BASE_PATH=customBasePath
    [email protected]/token

Dependencies

  • boom
  • config
  • dotenv
  • joi
  • koa
  • koa-bodyparser
  • koa-router
  • raven

Dev Dependencies

  • snazzy
  • standard
  • supertest

Usage

Once the app is ready n running, use any HTTP(s) client to make a request:

$npm start

You can set port on config file, if not, default is 3001.

Examples:


Shoud return just:

{
    "version": "0.1.0",
    "uptime": 31.523
}

Shoud return just:

pong

Shoud return just:

{
    "state": "on"
}

Or:

{
    "state": "off"
}

About

Repo for tests with NodeJS on top of a Raspberry Pi 3 model B

Resources

License

Stars

Watchers

Forks

Packages

No packages published