Heroku compat, get /

This commit is contained in:
goat 2021-05-26 00:00:54 +02:00
parent 077273c3c3
commit 4f599d4ff5
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -1,7 +1,7 @@
const fetch = require("node-fetch"); const fetch = require("node-fetch");
const express = require('express'); const express = require('express');
const app = express(); const app = express();
const port = 80; const port = process.env.PORT || 5000;
const { CardCreator } = require('./create-card'); const { CardCreator } = require('./create-card');
@ -45,6 +45,10 @@ app.get('/characters/name/:world/:charName', async (req, res) => {
} }
}) })
app.get('/', async (req, res) => {
res.redirect('https://github.com/ArcaneDisgea/XIV-Character-Cards');
})
app.listen(port, () => { app.listen(port, () => {
console.log(`Listening at http://localhost:${port}`) console.log(`Listening at http://localhost:${port}`)
}) })