Browse Source

server

master
Cailean Finn 6 months ago
parent
commit
951224f0ea
  1. 3
      .gitignore
  2. 3
      public/json/wanderers.json
  3. 2
      server.js

3
.gitignore

@ -1,3 +1,4 @@
/node_modules/ /node_modules/
/package-lock.json /package-lock.json
/.env /.env
/public/json/counter.json

3
public/json/wanderers.json

@ -1,3 +0,0 @@
{
"count": 0
}

2
server.js

@ -9,7 +9,7 @@ require('dotenv').config();
const app = express(); const app = express();
const PORT = process.env.PORT || 3000; const PORT = process.env.PORT || 3000;
const GITEA_SECRET = process.env.GITEA_SECRET const GITEA_SECRET = process.env.GITEA_SECRET
const counterFilePath = path.join(__dirname, 'public/json/wanderers.json'); const counterFilePath = path.join(__dirname, 'public/json/counter.json');
function readCounter() { function readCounter() {
const data = fs.readFileSync(counterFilePath) const data = fs.readFileSync(counterFilePath)

Loading…
Cancel
Save