Skip to content

A Nodejs Express based WebAPI server to turn on/off RPi GPIO

Notifications You must be signed in to change notification settings

notsunohito/express-gpio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express-GPIO

  • A Nodejs Express based WebAPI server to turn on/off RPi GPIO

Install on your RPi

$git clone http://github.com/notsunohito/express-gpio && cd express-gpio

$npm install --production

Start the server

$npm start

Usage

$curl --request GET http://{RPi's hostname}:3000/gpio/2/high

will turn on GPIO2

$curl --request GET http://{RPi's hostname}:3000/gpio/2/low

will turn off GPIO2

If you want to use an example GUI, Open http://{RPi's hostname}:3000/ with browser

*only supported for Rpi >= Rev2 at the moment

*only supported for HIGH or LOW at the moment

Develop

Install full packages:

$npm install

Install gulp globally:

$npm install --global gulp

Start the server with nodemon:

$gulp dev

Open another terminal then:

$gulp

will enable BrowserSync

About

A Nodejs Express based WebAPI server to turn on/off RPi GPIO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published