Easy to Understand Config
Lucer uses a single JSON file for its configuration (see example below)
Let's Encrypt Certificates
Setting the TLS mode to `letsencrypt` automatically gets and manages SSL certificates for you
MIT License
Lucer is 100% open source and it was built with the idea that it can be audited by anyone in a few hours
Config Example
{
"http": {
"enable": true,
"host": "0.0.0.0",
"port": 80,
"redirect_to_https": true
},
"https": {
"enable": true,
"host": "0.0.0.0",
"port": 443,
"tls": {
"mode": "letsencrypt"
}
},
"services": [{
"domains": ["example.com", "www.example.com"],
"options": {
"max_body_size_bytes": 100000000,
"error_mode": "html"
},
"routes": {
"GET:/json_data": {
"send_status": 404,
"send_json": { "key": "value" }
},
"GET:/html": {
"send_status": 200,
"send_html": "<h1>LUCER</h1>"
},
"GET:/text": {
"send_status": 200,
"send_text": "Hello Lucer"
},
"GET:/img.png": {
"send_status": 200,
"send_file": "/home/user/test/img.png"
},
"GET:/video.mp4": {
"stream_file": "/home/user/test/video.mp4"
},
"GET:/files/*": {
"server_files": {
"dir_path": "/home/user/files"
}
},
"*:/api/*": {
"load_balancer": {
"algorithm": "round_robin",
"servers": ["http://127.0.0.1:3001", "http://127.0.0.1:3002", "http://127.0.0.1:3003"]
}
},
"*:*": {
"proxy": "http://127.0.0.1:3000"
}
}
}]
}