Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
simcaq-node
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simcaq
simcaq-node
Commits
9a25381d
Commit
9a25381d
authored
8 years ago
by
Vytor Calixto
Browse files
Options
Downloads
Patches
Plain Diff
Basic prototype
Not following any specs
parent
bcfdbac0
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+1
-6
1 addition, 6 deletions
README.md
libs/app.js
+1
-1
1 addition, 1 deletion
libs/app.js
libs/routes/api.js
+23
-0
23 additions, 0 deletions
libs/routes/api.js
with
25 additions
and
7 deletions
README.md
+
1
−
6
View file @
9a25381d
# Node+Express base
This project contains necessary files and code to start a NodeJS+Express server.
## License
This project is under the
[
MIT License
](
LICENSE
)
.
# SIMCAQ
This diff is collapsed.
Click to expand it.
libs/app.js
+
1
−
1
View file @
9a25381d
...
...
@@ -18,7 +18,7 @@ app.use(bodyParser.urlencoded({ extended: false }))
app
.
use
(
cookieParser
())
app
.
use
(
methodOverride
())
app
.
use
(
'
/v1/
'
,
api
)
app
.
use
(
'
/
api/
v1/
'
,
api
)
// catch 404 and forward to error handler
app
.
use
(
function
(
req
,
res
,
next
){
...
...
This diff is collapsed.
Click to expand it.
libs/routes/api.js
+
23
−
0
View file @
9a25381d
...
...
@@ -14,4 +14,27 @@ router.get('/', function (req, res) {
})
})
router
.
get
(
'
/data
'
,
function
(
req
,
res
)
{
console
.
log
(
req
.
query
)
console
.
log
(
req
.
query
.
met
)
console
.
log
(
req
.
query
.
dim
)
conn
.
query
(
'
SELECT * FROM turmas
'
).
then
(
function
(
result
)
{
res
.
json
({
result
:
result
})
})
})
router
.
get
(
'
/matriculas
'
,
function
(
req
,
res
)
{
conn
.
query
(
'
SELECT count(VT07) FROM turmas WHERE VT11 <= 3
'
).
then
(
function
(
result
)
{
res
.
json
({
result
:
result
})
})
})
module
.
exports
=
router
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment