- Sep 02, 2016
-
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <jvtr12@inf.ufpr.br>
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <jvtr12@inf.ufpr.br>
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <jvtr12@inf.ufpr.br>
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <jvtr12@inf.ufpr.br>
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <jvtr12@inf.ufpr.br>
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <jvtr12@inf.ufpr.br>
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <jvtr12@inf.ufpr.br>
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <jvtr12@inf.ufpr.br>
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <jvtr12@inf.ufpr.br>
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <jvtr12@inf.ufpr.br>
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <jvtr12@inf.ufpr.br>
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <jvtr12@inf.ufpr.br>
-
João Victor Tozatti Risso authored
-
João Victor Tozatti Risso authored
Signed-off-by:
João Victor Tozatti Risso <joao@portalmec5.c3local>
-
Gustavo Soviersovski authored
-
Vytor Calixto authored
Route /cities/ibge/:id removed also Do not tell people I did that
-
Vytor Calixto authored
Dimensions middleware This middleware is used to get the dimensions in the query parameter `dims` as an array of dimensions. EXAMPLE USAGE: * Use it with no parameters to get all the dimensions in the query: `app.get('/', dimensions(), function(req, res, next){})` * Use it with an array of accepted values: `app.get('/', dimensions(['year', 'location']), function(req, res, next){})` * Use it globally: `app.use(dimensions())` See merge request !9
-
- Aug 31, 2016
-
-
Vytor Calixto authored
-
- Aug 29, 2016
-
-
João Victor Risso authored
-
João Victor Risso authored
Remove all files from build directory. The rationale is that this directory is updated frequently during the development process and might add too much 'noise' in the commits in the repository.
-
João Victor Risso authored
Changes in this commit: - Singularize all routes and components - Separate different modules into their own source files - Rename the API module to enrollment and add a more general API module - Resources that are related to a route, are now under its scope. For example, the year range of the enrollment component is now under the route /v1/enrollment/year_range - Implement a thenable function to execute the queries against the database to reduce the amount of duplicated code in the application. This approach also allows several concurrent queries to run concurrently in the same route.
-
- Aug 25, 2016
-
-
Vytor Calixto authored
EXAMPLE USAGE: * Use it with no parameters to get all the dimensions in the query: `app.get('/', dimensions(), function(req, res, next){})` * Use it with an array of accepted values: `app.get('/', dimensions(['year', 'location']), function(req, res, next){})` * Use it globally: `app.use(dimensions())`
-
- Aug 17, 2016
-
-
João Victor Risso authored
Signed-off-by:
João Victor Risso <jvtr12@c3sl.ufpr.br>
-
João Victor Risso authored
Signed-off-by:
João Victor Risso <jvtr12@c3sl.ufpr.br>
-
João Victor Risso authored
-
João Victor Risso authored
Signed-off-by:
João Victor Risso <jvtr12@c3sl.ufpr.br>
-
João Victor Risso authored
-
João Victor Risso authored
-
João Victor Risso authored
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>
-
- Aug 11, 2016
-
-
Vytor Calixto authored
-
- Aug 10, 2016
-
-
João Victor Risso authored
Changelog: - Add education level to all queries - Add route '/education_level' to query the available education levels. The response is a set of pairs (id, education_level) - Change var declarations to their respective const and let counterparts - Fix wrong foreign key name in the aggregation by states. When a adm_dependency_id parameter was supplied, the query would fail.
-
- Aug 09, 2016
-
-
Vytor Calixto authored
-
- Aug 08, 2016
-
-
Vytor Calixto authored
Related: #8
-
- Aug 03, 2016
-
-
João Victor Risso authored
-
João Victor Risso authored
-
João Victor Risso authored
Changes: - Add error handling in the database query function. When a database error occurs, it is logged in the server and a plain text response is returned to the user. - Implement the building of queries inside the API, which removes the need to have stored functions/procedures on the database, which is not flexible or efficient to maintain/extend. - Use route chaining to determine which function will build the query that needs to be executed. The last function is the one that actually sends the query to the database and send the response. Future Work: - Instead of returning a plain text response, return a HTTP 501 status, which is currently not possible. When one attempts to send such status the framework throws an error that the headers were already sent for the current request. - Chaining based on the route might not be the best solution here.
-
- Aug 02, 2016
-
-
João Victor Risso authored
-
- Jul 27, 2016
-
-
Vytor Calixto authored
Tests See merge request !6
-
Lucas Gabriel Lima authored
-
Lucas Gabriel Lima authored
-