Change API to use ECMAScript6
Major modifications:
- Source code is now in the src directory
- All source files were adapted to ECMAScript6
- Add Gulpfile and Babel to transcompile the project from ES6 to ES5 (until Node.js fully supports ES6)
- By running gulp one generates the build directory with the files transcompiled, from which the API can be run
- Add ESLint to check for syntax errors and enforce code standards
- Javascript coding standard currently adopted is AirBnB with 4 spaces
- Replace monetdb package with monetdb-pool, which allows for concurrent queries over a pool of connections while maintaining the same interface
TODO (in order of priority, from high to low):
- Add Gulp tasks to handle automatic building, tests and running the server in order to deprecate using npm
- Implement decorator to execute the SQL queries and reduce code duplication.
- Implement SQL query builder (e.g. squel.js) to erradicate the need for embedding SQL directly into the code (which is error-prone).
- Change enrollments route not to use route chaining in order to decide which SQL query is appropriate to respond the user's request.
- Implement decorator for API responses and also reduce code duplication.
- Split up tests into and add more test cases.
Signed-off-by:
João Victor Risso <jvtr12@c3sl.ufpr.br>
Showing
.babelrc
0 → 100644
.eslintrc.json
0 → 100644
build/config.json
0 → 100644
build/libs/app.js
0 → 100644
build/libs/config.js
0 → 100644
build/libs/enrollment/all.js
0 → 100644
build/libs/log.js
0 → 100644
build/libs/routes/api.js
0 → 100644
This diff is collapsed.
build/libs/routes/cities.js
0 → 100644
build/libs/routes/regions.js
0 → 100644
build/libs/routes/states.js
0 → 100644
build/logs/.gitignore
0 → 100644
build/server.js
0 → 100644
build/test/test.js
0 → 100644