FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node-js-getting-started/index.js at master · STeLSuKOrganization/node-js-getting-started · GitHub
STeLSuKOrganization
/
node-js-getting-started
Public
forked from
heroku/nodejs-getting-started
Notifications
You must be signed in to change notification settings
Fork
1
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
node-js-getting-started
/
index.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
20 lines (13 loc) · 460 Bytes
Breadcrumbs
node-js-getting-started
/
index.js
Copy path
File metadata and controls
20 lines (13 loc) · 460 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
var
express
=
require
(
'express'
)
;
var
app
=
express
(
)
;
app
.
set
(
'port'
,
(
process
.
env
.
PORT
||
5000
)
)
;
app
.
use
(
express
.
static
(
__dirname
+
'/public'
)
)
;
// views is directory for all template files
app
.
set
(
'views'
,
__dirname
+
'/views'
)
;
app
.
set
(
'view engine'
,
'ejs'
)
;
app
.
get
(
'/'
,
function
(
request
,
response
)
{
response
.
render
(
'pages/index'
)
;
}
)
;
app
.
listen
(
app
.
get
(
'port'
)
,
function
(
)
{
console
.
log
(
'Node app is running on port'
,
app
.
get
(
'port'
)
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL