Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
slash-done
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
open-source
slash-done
Merge requests
!1
Basic plugin functionality
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Basic plugin functionality
develop
into
master
Overview
0
Commits
6
Changes
2
Merged
Erick Hitter
requested to merge
develop
into
master
8 years ago
Overview
0
Commits
6
Changes
2
Expand
0
0
Merge request reports
Viewing commit
37d208c1
Prev
Next
Show latest version
2 files
+
36
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
37d208c1
Basic request handling
· 37d208c1
Erick Hitter
authored
8 years ago
index.js
+
34
−
0
Options
"
use strict
"
;
// Dependencies
var
express
=
require
(
'
express
'
);
var
app
=
express
();
var
bodyParser
=
require
(
'
body-parser
'
);
app
.
use
(
bodyParser
.
text
()
);
app
.
use
(
bodyParser
.
urlencoded
(
{
extended
:
true
}
)
);
// Config
var
config
=
require
(
'
./config.json
'
);
// Landing page for status checks
app
.
get
(
'
/
'
,
function
(
req
,
res
)
{
var
msg
=
'
slash-done running
'
;
res
.
send
(
msg
);
});
// Parse POST body to create WP post
app
.
post
(
'
/log
'
,
function
(
req
,
res
)
{
// Don't bother if there's nothing to record
if
(
'
undefined
'
===
typeof
req
.
body
||
!
req
.
body
.
length
)
{
return
res
.
sendStatus
(
400
);
}
res
.
sendStatus
(
200
);
});
//tells Node which port to listen on
app
.
listen
(
config
.
node_port
,
config
.
node_listener
,
function
()
{
console
.
log
(
'
slash-done running on
'
,
config
.
node_listener
,
'
and port
'
,
config
.
node_port
);
});
Loading