mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-21 04:26:28 +02:00
return 200 and piston ver on /, fix empty content-type header validation
This commit is contained in:
parent
7441f2633d
commit
e86c19b007
3 changed files with 8 additions and 2 deletions
|
@ -79,6 +79,12 @@ expressWs(app);
|
|||
const api_v2 = require('./api/v2');
|
||||
app.use('/api/v2', api_v2);
|
||||
|
||||
const { version } = require('../package.json');
|
||||
|
||||
app.get('/', (req, res, next) => {
|
||||
return res.status(200).send({ message: `Piston v${version}` });
|
||||
});
|
||||
|
||||
app.use((req, res, next) => {
|
||||
return res.status(404).send({ message: 'Not Found' });
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue