aboutsummaryrefslogtreecommitdiff
path: root/src/index.ts
Commit message (Collapse)AuthorAgeFilesLines
* Refactor startup to passthrough valuesKevin J Hoerr2020-04-271-3/+8
| | | | | | | | Even more refactoring - however there were some small troubles using path in the nested scripts/files, so referencing them via the index should be a bit more stable. Plus, the config unit tests won't just exit because of configOrError constants strewn about the file.
* These changes moved a lot of the startup async to run in a streamlinedKevin J Hoerr2020-04-261-51/+31
| | | | | | | | | | async init function. This brings more logic "to light", so it should probably have unit tests added to check the edge cases. As a bonus, no async runs as a result of route initialization. Speaking of routes, it might be nice to trim down the route calls themselves with async functions, if possible. The upload routes in particular use a lot of async. Just a note for the future.
* #8 Add router unit tests using supertestKevin J Hoerr2020-01-111-35/+0
| | | | Also moved the template processing from index to router.
* Move template files to subfolderKevin J Hoerr2019-12-291-2/+2
| | | | | | | More static files will likely be used that do not require using a template (e.g. favicon.ico), so storing them in the public folder will keep them with other served files without getting them confused with the templates.
* Add index.html template with route for integrationKevin J Hoerr2019-12-291-0/+11
|
* AOC-3 Catch promise rejections in POST requestKevin J Hoerr2019-12-211-1/+1
|
* Use nullish-coalescing op for env var assignmentsKevin J Hoerr2019-12-121-4/+4
|
* Simplify and generalize template processingKevin J Hoerr2019-12-121-1/+22
| | | | "For the unit tests. For the unit tests!"
* Add template process to serve bash fileKevin J Hoerr2019-12-091-0/+3
| | | | | | | | | | | | Unfortunately, a static file can't really be used to serve the connection - the host address is needed to link back to the server. Only a light library is needed to handle the template file though, and if more are needed in the future it should be a non-trivial task to add them to the process. By default I'm configuring this to work with drone.io, since that is the CI that I personally will be using (most likely). It should be non-trivial to configure other CI to handle the script as well.
* Add linting to project using EslintKevin J Hoerr2019-12-091-10/+10
|
* Overhaul error handling for controllersKevin J Hoerr2019-12-081-0/+1
| | | | | | | | | | | This change fixes various issues with the GET endpoints to return more accurate error messages. It adds business logic error objects that are returned in a union type in the controllers. This change should help separate the business logic from the actual errors from upstream services. There may be required changes still with handling those upstream errors via Promises. Integration tests should be added to verify issues.
* Refactor routes into separate fileKevin J Hoerr2019-12-081-129/+3
|
* Add winston, express-winston to handle loggingKevin J Hoerr2019-12-081-55/+35
|
* Add Metadata core with MongoDB for persistenceKevin J Hoerr2019-12-071-103/+183
| | | | | | | | | | | With the new process dependency, process handling has been added to ensure that the ExpressJS server and MongoDB client connections get closed up properly. As noted in the Metadata file above the Branch interface, the schema is definitely not finalized. Eventually metadata will be needed at the repo level anyways, so reorganizing the document schema is high on the priority list.
* Prepare repository for 0.1.0 releaseKevin J Hoerr2019-11-301-6/+0
|
* Disable branch GET EPs until Metadata is doneKevin J Hoerr2019-11-301-2/+2
|
* Remove default value for format parameterKevin J Hoerr2019-11-301-3/+2
|
* Implement file handling for reportsKevin J Hoerr2019-11-291-33/+54
|
* Implement report parsing for TarpaulinKevin J Hoerr2019-11-291-3/+8
| | | | | | | | | | The generated Tarpaulin HTML report does not have stats to parse via the DOM - the data is injected via a script tag, which only has line-by-line coverage, though it includes statistics for each file. The total coverage is counted by summing the covered/coverable stats reported for each file. Also, the bad version for express is fixed, and messages are included for errors that occur for the POST endpoint.
* Add Prettier to projectKevin J Hoerr2019-11-231-31/+44
| | | | Signed-off-by: Kevin J Hoerr <kjhoerr@protonmail.com>
* Generate report badge with color gradientKevin J Hoerr2019-11-231-12/+22
|
* Move TS files into /srcKevin J Hoerr2019-11-101-0/+91