gistlib
index.tsxconst express = require('express'); const app = express(); const port = 3000; app.get('/api/users', (req, res) => { res.json({ users: [ { name: 'Alice', age: 30 }, { name: 'Bob', age: 35 } ]}); }); app.listen(port, () => { console.log(`API server is running at http://localhost:${port}`); }); 323 chars15 lines
const express = require('express'); const app = express(); const port = 3000; app.get('/api/users', (req, res) => { res.json({ users: [ { name: 'Alice', age: 30 }, { name: 'Bob', age: 35 } ]}); }); app.listen(port, () => { console.log(`API server is running at http://localhost:${port}`); });
gistlibby LogSnag