CoolFace
Apppublic

tomayac/nodejs-template

sourceHugging Faceapache-2.0updated 11mo agoView on Hugging Face
2likes
index.js21 linesDownload Raw Back to root
1import express from "express";2 3const app = express();4const port = 7860;5 6app.get('/', async (req, res) => {7  res.send(8    `Running Express.js ${9      (10        await import('express/package.json', {11          with: { type: 'json' },12        })13      ).default.version14    } on Node.js ${process.version.split('.')[0].replace('v', '')}`,15  );16});17 18app.listen(port, () => {19  console.log(`Example app listening on port ${port}`);20});21