https://github.com/dustinbrett/iiaas
Incrementing Integers As A Service
https://github.com/dustinbrett/iiaas
Last synced: 8 months ago
JSON representation
Incrementing Integers As A Service
- Host: GitHub
- URL: https://github.com/dustinbrett/iiaas
- Owner: DustinBrett
- Created: 2017-02-20T10:40:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-22T04:28:56.000Z (over 9 years ago)
- Last Synced: 2025-03-24T16:11:30.152Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://ec2.dustinbrett.com:3000/v1/
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# URL
http://ec2.dustinbrett.com:3000/v1/ (ec2-54-187-178-83.us-west-2.compute.amazonaws.com)
# Installation
- git clone https://github.com/DustinBrett/iiaas.git
- npm install
- node server.js (Requires R/W permission to users.json)
# Usage
Register as a user
- curl -X "POST" http://ec2.dustinbrett.com:3000/v1/register --data "email={email address}&password={password}"
Get the next integer in the sequence
- curl http://ec2.dustinbrett.com:3000/v1/next -H "Authorization: Bearer {API key}"
Get the current integer
- curl http://ec2.dustinbrett.com:3000/v1/current -H "Authorization: Bearer {API key}"
Reset the current integer
- curl -X "PUT" http://ec2.dustinbrett.com:3000/v1/current -H "Authorization: Bearer {API key}" --data "current={non-negative integer}"