mirror of
https://github.com/gigirassy/plaster.git
synced 2024-12-23 18:39:07 +00:00
Update app.js
This commit is contained in:
parent
24b0d577e9
commit
3be15e71cb
8
app.js
8
app.js
@ -1,10 +1,18 @@
|
|||||||
const express = require('express');
|
const express = require('express');
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
|
const cookieParser = require('cookie-parser');
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const PORT = process.env.PORT || 3000;
|
const PORT = process.env.PORT || 3000;
|
||||||
|
|
||||||
app.use(express.static('public'));
|
app.use(express.static('public'));
|
||||||
|
app.use(cookieParser());
|
||||||
|
|
||||||
|
const autoCopyDefault = process.env.AUTO_COPY_DEFAULT === 'false';
|
||||||
|
|
||||||
|
app.get('/auto-copy-default', (req, res) => {
|
||||||
|
res.json({ autoCopyDefault });
|
||||||
|
});
|
||||||
|
|
||||||
// Route to handle raw Pastebin requests
|
// Route to handle raw Pastebin requests
|
||||||
app.get('/:pasteId', async (req, res) => {
|
app.get('/:pasteId', async (req, res) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user