FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
CommunityJS/server.js at master · CommunityJS/CommunityJS · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
CommunityJS
/
CommunityJS
Public
forked from
luebken/CommunityJS
Notifications
You must be signed in to change notification settings
Fork
3
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
CommunityJS
/
server.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (28 loc) · 815 Bytes
Breadcrumbs
CommunityJS
/
server.js
Copy path
File metadata and controls
35 lines (28 loc) · 815 Bytes
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
var
express
=
require
(
'express'
)
,
groups
=
require
(
'./groups'
)
;
var
app
=
express
.
createServer
(
)
;
app
.
configure
(
function
(
)
{
app
.
use
(
express
.
static
(
__dirname
+
'/public'
)
)
;
}
)
;
app
.
get
(
'/'
,
function
(
req
,
res
)
{
groups
.
getTree
(
function
(
err
,
groups
,
conferences
,
rawdata
)
{
res
.
render
(
'index.jade'
,
{
groups
:
groups
,
conferences
:
conferences
}
)
;
}
)
;
}
)
;
app
.
get
(
'/data'
,
function
(
req
,
res
)
{
groups
.
getTree
(
function
(
err
,
groups
,
conferences
,
rawdata
)
{
res
.
send
(
'var data = '
+
JSON
.
stringify
(
rawdata
)
+
";"
)
;
}
)
;
}
)
;
app
.
get
(
'/flushcache'
,
function
(
req
,
res
)
{
groups
.
flushCache
(
)
;
res
.
send
(
'done'
)
;
}
)
;
app
.
get
(
'/about'
,
function
(
req
,
res
)
{
res
.
render
(
'about.jade'
)
;
}
)
;
var
port
=
parseInt
(
process
.
env
.
PORT
||
8000
)
;
app
.
listen
(
port
)
;
console
.
log
(
'Server listening on '
+
port
)
;
Back
|
FazBrowse Home
|
New Git URL