master
Conor 5 months ago
parent 683032d71a
commit 311a58cde4
GPG Key ID: A28C6F51829932B9
  1. 4
      .gitignore
  2. 1
      db.json
  3. 6
      index.js
  4. 1
      public/instant-opinion.min.js

4
.gitignore vendored

@ -1,2 +1,4 @@
# Project exclude paths
/node_modules/
/node_modules/
db.json

@ -1 +0,0 @@
{"counts":{"nftm.art":[1,0],"localhost":[4,2]},"latest":{}}

@ -156,6 +156,8 @@ app.get('/votes/:site', (req, res) => {
return res.json({percent: getPercent(site), success: true});
});
app.use(express.static('public'));
app.options('*', cors());
function saveAndCleanup() {
@ -166,8 +168,8 @@ function saveAndCleanup() {
setInterval(saveAndCleanup, 86400000)
try {
app.listen(3000, () => {
console.log('App listening on port 3000!');
app.listen(6721, () => {
console.log('App listening on port 6721!');
});
} catch (e) {
console.log("Saving DB");

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save