FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
NodeJS-REST-API-SQLite/index.js at master · logorn/NodeJS-REST-API-SQLite · GitHub
logorn
/
NodeJS-REST-API-SQLite
Public
Notifications
You must be signed in to change notification settings
Fork
19
Star
4
Code
Pull requests
1
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
NodeJS-REST-API-SQLite
/
index.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (18 loc) · 573 Bytes
Breadcrumbs
NodeJS-REST-API-SQLite
/
index.js
Copy path
File metadata and controls
23 lines (18 loc) · 573 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
/* Load modules */
const
express
=
require
(
"express"
)
;
const
app
=
express
(
)
;
const
bodyParser
=
require
(
"body-parser"
)
;
/* Database configuration */
const
database
=
require
(
'./app/config/dbconfig'
)
;
/* Init database */
database
.
init
(
)
;
/* Init server listening */
const
port
=
process
.
argv
[
2
]
||
3000
;
app
.
listen
(
port
,
function
(
)
{
console
.
log
(
"Server listening on port : "
+
port
)
;
}
)
;
/* Express configuration */
app
.
use
(
bodyParser
.
urlencoded
(
{
extended
:
false
}
)
)
;
app
.
use
(
bodyParser
.
json
(
)
)
;
/* Router configuration */
app
.
use
(
require
(
'./app/routes/Router'
)
)
;
Back
|
FazBrowse Home
|
New Git URL