Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add server.js for legacy web basic sample
- Loading branch information
1 parent
b4b4176
commit d7f7423
Showing
5 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "Sample-JS-Web-Basic", | ||
"version": "1.0.0", | ||
"description": "SendBird Web Basic Sample", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "SendBird", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"express": "^4.16.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const express = require('express'); | ||
const app = express(); | ||
|
||
const PORT = 9001; | ||
|
||
app.use(express.static('build')); | ||
app.use(express.static('./')); | ||
|
||
app.get('/', function(req, res) { | ||
res.sendfile('index.html'); | ||
}); | ||
|
||
app.listen(PORT); | ||
console.log(`[SERVER RUNNING] 127.0.0.1:${PORT}`); |
Binary file not shown.
Binary file not shown.
Binary file not shown.