-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
39 lines (22 loc) · 740 Bytes
/
index.js
File metadata and controls
39 lines (22 loc) · 740 Bytes
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
import express from 'express';
import bodyParser from 'body-parser';
import fs from "fs";
import appRootPath from "app-root-path";
import path from "path";
import api from './api/index.js';
const app = express();
app.use(bodyParser.urlencoded({extended: false}));
app.use(bodyParser.json());
app.use(api);
app.listen(3000, () => {
console.log(`App running on port 3000...`);
});
const testFilesName = ["center_text", "scaffold", "login", "signup", "homePage", "login.2.0.0"];
const testedFile = testFilesName[4]
function readFileInput() {
try {
return fs.readFileSync(path.join(appRootPath.path, "/samples/") + testedFile + ".txt", "utf8");
} catch (e) {
console.log("Error:", e.stack);
}
}