Update readme and add comments defining
future features.
This commit is contained in:
parent
3d30b6964f
commit
4057b50d08
11
README.md
11
README.md
@ -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.
|
||||||
|
|
@ -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) {
|
||||||
|
Reference in New Issue
Block a user