FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
processing-js/server.js at master · processing-js/processing-js · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
This repository was archived by the owner on Dec 5, 2018. It is now read-only.
processing-js
/
processing-js
Public archive
Notifications
You must be signed in to change notification settings
Fork
880
Star
3.1k
Code
Issues
69
Pull requests
7
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
processing-js
/
server.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
41 lines (34 loc) · 1.37 KB
Breadcrumbs
processing-js
/
server.js
Copy path
File metadata and controls
executable file
·
41 lines (34 loc) · 1.37 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var
http
=
require
(
"http"
)
,
express
=
require
(
"express"
)
,
nunjucks
=
require
(
"nunjucks"
)
,
app
=
express
(
)
,
nunjucksEnv
=
new
nunjucks
.
Environment
(
new
nunjucks
.
FileSystemLoader
(
'views'
)
)
;
nunjucksEnv
.
express
(
app
)
;
app
.
use
(
express
.
static
(
'test'
)
)
;
app
.
use
(
express
.
static
(
'test/tools'
)
)
;
var
js
=
function
(
_
,
res
,
next
)
{
res
.
header
(
'Content-Type'
,
'application/javascript'
)
;
next
(
)
;
}
;
app
.
get
(
"/"
,
function
(
req
,
res
)
{
res
.
render
(
"test.html"
)
;
}
)
;
app
.
get
(
"/processing.js"
,
js
,
function
(
req
,
res
)
{
res
.
render
(
"processing.js"
)
;
}
)
;
app
.
get
(
"/processing.min.js"
,
js
,
function
(
req
,
res
)
{
res
.
render
(
"processing.min.js"
)
;
}
)
;
// parameters for the termination route
app
.
param
(
'failed'
,
function
(
req
,
res
,
next
,
failed
)
{
app
.
locals
.
failed
=
parseInt
(
failed
,
10
)
;
next
(
)
;
}
)
;
app
.
param
(
'knownfailed'
,
function
(
req
,
res
,
next
,
knownfailed
)
{
app
.
locals
.
knownfailed
=
parseInt
(
knownfailed
,
10
)
;
next
(
)
;
}
)
;
app
.
param
(
'passed'
,
function
(
req
,
res
,
next
,
passed
)
{
app
.
locals
.
passed
=
parseInt
(
passed
,
10
)
;
next
(
)
;
}
)
;
// termination route
app
.
get
(
"/stopserver/:failed/:knownfailed/:passed"
,
function
(
req
,
res
)
{
console
.
log
(
app
.
locals
.
failed
+
"."
+
app
.
locals
.
knownfailed
+
"."
+
app
.
locals
.
passed
)
;
process
.
exit
(
0
)
;
}
)
;
app
.
listen
(
3000
,
function
(
)
{
console
.
log
(
'Express server listening on port 3000'
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL