Spaces:
Running
Running
| import express from "express"; | |
| const app = express(); | |
| const port = 7860; | |
| app.get('/', async (req, res) => { | |
| res.send( | |
| `Running Express.js ${ | |
| ( | |
| await import('express/package.json', { | |
| with: { type: 'json' }, | |
| }) | |
| ).default.version | |
| } on Node.js ${process.version.split('.')[0].replace('v', '')}`, | |
| ); | |
| }); | |
| app.listen(port, () => { | |
| console.log(`Example app listening on port ${port}`); | |
| }); | |