hieplpvip / FreeContest-BE1010

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BE1010 - Backend Entry Task 1

Install dependencies

npm install

Start server

npm start

By default, server runs on port 5000.

Usage

  • Get current timestamp:
curl -X GET "localhost:5000/timestamp"
  • Log message:
curl -H "Content-Type: application/json" \
     -d '{"level":"info","message":"Testing message"}' \
     -X POST "localhost:5000/logs"
  • Get last 2 logs:
curl -X GET "localhost:5000/logs?limit=2"

About

License:MIT License


Languages

Language:TypeScript 100.0%