6fab87e35cf0db1a05eb2fbd58442f989913058e
Lambda-IoT Core
This repository contains a minimal Go REST service used as the backend for the Lambda-IoT project.
Repository: https://git.piskot.si/SeminarM2/lambdaiot-core
Features ✅
- Simple HTTP server with two endpoints:
GET /health— basic health checkGET /hello— example greeting endpoint
- Tests for handlers using
httptest - Multi-stage
Dockerfilefor small production images Makefilewith common tasks (build, run, test, docker-build)
Quickstart 🔧
Build and run locally:
make build
./bin/server
Run tests:
make test
Build Docker image:
make docker-build
Then run it:
docker run -p 8080:8080 lambdaiot-core:latest
Endpoints
http://localhost:8080/health— returns{ "status": "ok" }http://localhost:8080/hello— returns a small greeting JSONPOST http://localhost:8080/login— demo login, JSON body:{ "username": "admin", "password": "password" }, returns{ "token": "..." }GET http://localhost:8080/protected— protected endpoint requiringAuthorization: Bearer <token>header
Environment
JWT_SECRET— (optional) secret used to sign tokens; defaults tosecretfor local/dev use
If you want I can wire more features (structured logging, config, middleware, or dependency injection). Just tell me which direction to take. 🎯
Description
Languages
Go
78%
Python
10.3%
C++
9.5%
Shell
1.1%
Dockerfile
0.8%
Other
0.3%