Future Predictor API is a Nestjs fun API that predicts your future and gives you a percentage chance of success.
You send a POST HTTP request to (default) localhost:3000/api/v1/future
with a JSON on the body that has a name key. Example:
const params = {
name: 'Igor Guastalla'
}
this
.$http
.post('http://localhost:3000/api/v1/future', params)
You should get a JSON like this:
{
"name": "Igor",
"id": "33df5297-4889-4579-9739-7d70c3453316",
"result": "happy",
"description": "You will be happy in 10 years!",
"percentage": 50
}
It stores the data on a PostgreSQL database.
Also has other HTTP Request Methods, such as GET and DELETE to GET all your predictions or to DELETE one.
Method | Request URL | QueryString | Body |
---|---|---|---|
GET | api/v1/future | Optional, but you can pass ?id= |
- |
POST | api/v1/future | - | { name: 'Name' } |
DELETE | api/v1/future/:id | - | - |
This project is currently under development so has a lot of bugs.
You will need Docker. Clone this repository and then run docker-compose up --build
.
By default it runs on port:3000
.
Apache 2.0 © guastallaigor