Showing
1 changed file
with
18 additions
and
0 deletions
index.js
0 → 100644
1 | +const express = require('express'); | ||
2 | +const fs = require('fs'); | ||
3 | +const router = express.Router(); | ||
4 | + | ||
5 | +var sentiment = fs.readFileSync("sentiment.txt").toString().split('\n'); | ||
6 | +var date = fs.readFileSync("date.txt").toString(); | ||
7 | + | ||
8 | +module.exports = function(app){ | ||
9 | + app.get('/',function(req,res){ | ||
10 | + res.render('index.html', { | ||
11 | + total : sentiment[0], | ||
12 | + positive : sentiment[1], | ||
13 | + neutral : sentiment[2], | ||
14 | + negative : sentiment[3], | ||
15 | + date : date | ||
16 | + }); | ||
17 | + }); | ||
18 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment