Update readme and add comments defining

future features.
This commit is contained in:
Fred Boniface 2022-12-02 12:25:48 +00:00
parent 3d30b6964f
commit 4057b50d08
2 changed files with 13 additions and 1 deletions

View File

@ -23,3 +23,14 @@ Whilst the application is open source, the webservice (owlboard.fb-infra.uk) is
- Returns JSON: `{"STATION NAME":{"CRS":"code","TIPLOC":"code"}}` - Returns JSON: `{"STATION NAME":{"CRS":"code","TIPLOC":"code"}}`
- /ldb: - /ldb:
## Stack:
- app.js -> Launches server, Entry Point, defines routers and middlewares.
- routes -> Routers - Directs requests to controllers.
- controllers -> Checks auth, sends response. Request doesn't pass further.
- services -> Provide data and do tasks, uses other services and utils.
- utils -> Provide utility functions that can be called by services.
- configs -> Provide configuration details for other files.
- static -> Holds files for static service, should be hosted behind a caching proxy.

View File

@ -10,6 +10,7 @@ async function get(req, res, next){
} }
async function post(req, res){ async function post(req, res){
// try { checkAuth(req.body) } catch (err) { req.header(401); req.body({401:"unauthorised"})}
try { try {
res.json(await test.post(req.body)) res.json(await test.post(req.body))
} catch (err) { } catch (err) {