A "simple" Snake, done as my final JS class project back in DUT
https://snek.s.codinget.me
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
331 B
16 lines
331 B
const express=require('express');
|
|
|
|
const app=express();
|
|
const PORT=process.env.PORT || 3000;
|
|
|
|
app.use(express.json());
|
|
app.use(express.static('public'));
|
|
|
|
app.use('/api', require('./api'));
|
|
app.get('/api/has-nodejs', (req, res) => {
|
|
res.json("yes");
|
|
});
|
|
|
|
app.listen(PORT, () => {
|
|
console.log(`Listening on 0.0.0.0:${PORT}`);
|
|
});
|
|
|