-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
45 lines (36 loc) · 1.19 KB
/
index.js
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
42
43
44
45
/*_______ ____ _ _ _____
|__ __/ __ \| \ | |/ ____|
| | | | | | \| | (_____ ____ _ _ __
| | | | | | . ` |\___ \ \ /\ / / _` | '_ \
| | | |__| | |\ |____) \ V V / (_| | |_) |
|_| \____/|_| \_|_____/ \_/\_/ \__,_| .__/
| |
|_| */
/**
* @name TONSwap project - tonswap.com
* @copyright SVOI.dev Labs - https://svoi.dev
* @license Apache-2.0
* @version 1.0
*/
/**
* Server side
*/
const express = require('express');
const app = express();
const port = 3003;
const path = require('path');
app.use(express.static('public'));
//app.disable('view cache');
app.use('/modules/freeton', express.static('node_modules/freeton/src'));
app.use('/modules/ton-client-web-js', express.static('node_modules/ton-client-web-js/'));
app.use('/ton', express.static('dist'));
app.use('/tonclient.wasm', express.static('dist/tonclient.wasm'));
app.get('/', (req, res) => {
res.send('Hello World!');
})
app.get('*', function (req, res) {
res.status(404).sendFile(path.join(__dirname + '/public/404.html'));
});
app.listen(port, () => {
console.log(`TONSwap interface http://localhost:${port}`);
});