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
Harbor Registry
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
562a490e
Commit
562a490e
authored
2 years ago
by
Pietro Cavassin
Browse files
Options
Downloads
Plain Diff
Merge branch 'homologa' of gitlab.c3sl.ufpr.br:simcaq/simcaq-node into homologa
parents
bc50ee05
a313c3a5
No related branches found
No related tags found
2 merge requests
!309
Merge new updates into master
,
!287
Homologa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+0
-43
0 additions, 43 deletions
.gitlab-ci.yml
src/libs/routes/message.js
+9
-5
9 additions, 5 deletions
src/libs/routes/message.js
with
9 additions
and
48 deletions
.gitlab-ci.yml
deleted
100644 → 0
+
0
−
43
View file @
bc50ee05
image
:
node:9.2.1
stages
:
-
test
services
:
-
mongo:latest
variables
:
MONGO_URI
:
'
mongodb://mongo/app_name'
NODE_ENV
:
'
test'
#run_tests:
# stage: test
# before_script:
# - node -v
# - npm install --global gulp gulp-cli babel babel-cli babel-core babel-register mocha gulp-mocha #gulp-eslint
# - npm install
# script:
# - ping -W1 -c1 mongo
# - sed -i -e 's/false/true/g' config.json
# - gulp build
# - gulp test
# tags:
# - node
regression_tests
:
stage
:
test
before_script
:
-
npm install --global gulp gulp-cli babel babel-cli babel-core babel-register mocha gulp-mocha gulp-eslint
-
npm install
-
gulp build && gulp &
-
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
-
python get-pip.py
-
sleep
60
script
:
-
git clone https://gitlab.c3sl.ufpr.br/simcaq/lde-api-regression-test.git
-
cd lde-api-regression-test
-
pip install -r requirements.txt
-
python manage.py compare --verbose
tags
:
-
node
This diff is collapsed.
Click to expand it.
src/libs/routes/message.js
+
9
−
5
View file @
562a490e
...
...
@@ -26,19 +26,22 @@ const email = require(`../middlewares/email`);
const
log
=
require
(
`../log`
)(
module
);
messageApp
.
get
(
'
/
'
,
(
req
,
res
,
next
)
=>
{
res
.
json
({
msg
:
'
This is the message route
'
});
})
messageApp
.
post
(
'
/
'
,
(
req
,
res
,
next
)
=>
{
var
reqName
=
req
.
body
.
name
var
reqEmail
=
req
.
body
.
email
var
reqContents
=
req
.
body
.
contents
var
reqOrigin
=
req
.
body
.
origin
?
req
.
body
.
origin
:
""
;
var
sub
=
"
Contato
"
+
reqOrigin
let
mailOptions
=
{
from
:
`"
${
reqName
}
<
${
reqEmail
}
>"`
,
text
:
reqContents
from
:
`\"
${
reqName
}
\" <
${
reqEmail
}
>`
,
text
:
reqContents
,
subject
:
sub
}
console
.
log
(
"
reqbody
"
,
req
.
body
)
console
.
log
(
"
mail options
"
,
mailOptions
)
email
(
mailOptions
,
(
err
,
info
)
=>
{
if
(
err
)
{
log
.
error
(
err
);
...
...
@@ -52,3 +55,4 @@ messageApp.post('/', (req, res, next) => {
})
module
.
exports
=
messageApp
;
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