Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scanner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
whats-this
scanner
Commits
d8cb9211
Commit
d8cb9211
authored
8 years ago
by
aurieh
Browse files
Options
Downloads
Patches
Plain Diff
Remove things
parent
dc0fbe78
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
index.js
+2
-2
2 additions, 2 deletions
index.js
routes/freshclam.js
+1
-5
1 addition, 5 deletions
routes/freshclam.js
with
3 additions
and
7 deletions
index.js
+
2
−
2
View file @
d8cb9211
...
@@ -72,8 +72,8 @@ app.use(route.get('/freshclam', require('./routes/freshclam.js')));
...
@@ -72,8 +72,8 @@ app.use(route.get('/freshclam', require('./routes/freshclam.js')));
* Return a 200 OK response, so that Elastic Beanstalk can check if the server
* Return a 200 OK response, so that Elastic Beanstalk can check if the server
* is still online.
* is still online.
*/
*/
app
.
use
(
route
.
get
(
'
/health
'
,
(
req
,
res
,
next
)
=>
{
app
.
use
(
route
.
get
(
'
/health
'
,
()
=>
{
re
s
.
status
(
200
).
end
()
;
thi
s
.
status
=
200
;
}));
}));
// Listen on 8080
// Listen on 8080
...
...
This diff is collapsed.
Click to expand it.
routes/freshclam.js
+
1
−
5
View file @
d8cb9211
...
@@ -5,16 +5,12 @@ const freshClam = require('../lib/freshclam.js');
...
@@ -5,16 +5,12 @@ const freshClam = require('../lib/freshclam.js');
* > GET /freshclam
* > GET /freshclam
* Run freshclam to update the virus database.
* Run freshclam to update the virus database.
*/
*/
module
.
exports
=
function
*
freshclam
(
next
)
{
module
.
exports
=
function
*
freshclam
()
{
freshClam
().
then
(()
=>
{
freshClam
().
then
(()
=>
{
this
.
body
=
null
;
this
.
status
=
200
;
this
.
status
=
200
;
yield
;
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
error
(
'
failed to update virus definitions
'
);
console
.
error
(
'
failed to update virus definitions
'
);
console
.
error
(
err
);
console
.
error
(
err
);
this
.
body
=
null
;
this
.
status
=
500
;
this
.
status
=
500
;
yield
;
});
});
}
}
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