https://github.com/phodal/bracket
A Serverless IoT Server for Fun
https://github.com/phodal/bracket
internet-of-things iot serverless serverless-iot
Last synced: 11 months ago
JSON representation
A Serverless IoT Server for Fun
- Host: GitHub
- URL: https://github.com/phodal/bracket
- Owner: phodal
- License: mit
- Created: 2018-02-26T06:01:11.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-28T01:58:18.000Z (about 8 years ago)
- Last Synced: 2025-04-01T08:51:30.880Z (12 months ago)
- Topics: internet-of-things, iot, serverless, serverless-iot
- Language: JavaScript
- Homepage: https://iot.pho.im/
- Size: 30.3 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bracket
A Serverless IoT Server for Fun
**Features**
- On/Off Toggle
- JSON support
- Wechat Control
- AWS IoT?
On/Off Toggle
---
Action | HTTP Method | URL | Response
---------|---------------|------------------------|---------------
create | POST | /q | {"uuid":"HyOPYVfOf"}
on | GET | /q/{device_id}/on | {"results":"succeeded","status":1}
off | GET | /q/{device_id}/off | {"results":"succeeded","status":0}
status | GET | /q/{device_id} | {"status":0}
status | GET | /q/{device_id}/status | {"status":0}
### Examples
**Create**
```
$ curl -X POST https://iot.pho.im/q
{"uuid":"H1qG3tQ_M"}
```
**On/Off**
```
$ curl -X GET https://iot.pho.im/q/H1qG3tQ_M/on
{"results":"succeeded","status":1}
```
**Status**
```
$ curl -X GET curl -X GET https://iot.pho.im/q/H1qG3tQ_M/status
{"status":1}
```
Setup
---
```
npm install -g serverless
```
1.install
```
yarn install
```
2.create domain
```
sls create_domain
```
3.deloy
```
sls deploy
```
## LICENSE
[](http://ideas.phodal.com/)
© 2018 A [Phodal Huang](https://www.phodal.com)'s [Idea](http://github.com/phodal/ideas). This code is distributed under the MIT license. See `LICENSE` in this directory.