Code Monkey home page Code Monkey logo

mabede's Introduction

Mabede

Mabede is a database accessible through a Node.js API. Always use the datetime format YYYY-MM-DD hh:mm:ss in the requests.

Start the application in production:

docker-compose up -d --build

Start the application in development:

docker-compose -f docker-compose.yml -f docker-compose-dev.yml up -d --build

Stop the application:

docker-compose down

The --build flag rebuilds the image every time the application starts. Without this flag, updating the image requires deleting it before starting.

docker image rm mabede-mabede

Description

GET [host name]:80/

The above request returns the API's description.

Record weather data

POST [host name]:80/add-weather

The above request writes weather data in the database. The request's body must consist of a weather record or an array of weather records in the JSON format. Each weather record must have the following attributes.

  • moment (datetime): the moment when the data was recorded
  • temperature (number): the temperature in degrees Celsius
  • preciProb (number): the precipitation probability
  • windSpeed (number): the wind speed in kilometers per hour (km/h)

Body example with one weather record

{
    "moment": "2024-08-12 21:30:00",
    "temperature": 19,
    "preciProb": 0.20,
    "windSpeed": 9
}

Body example with an array of weather records

[
    {
        "moment": "2024-08-12 21:30:00",
        "temperature": 19,
        "preciProb": 0.20,
        "windSpeed": 9
    },
    {
        "moment": "2024-08-18 16:07:50",
        "temperature": 25,
        "preciProb": 0.30,
        "windSpeed": 18
    },
    {
        "moment": "2024-08-19 18:13:13",
        "temperature": 14,
        "preciProb": 0.70,
        "windSpeed": 16
    }
]

mabede's People

Contributors

grv96 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.