Mais uma rota adicionada
This commit is contained in:
parent
93a8e47617
commit
f2c57e5b3f
1 changed files with 6 additions and 0 deletions
|
|
@ -10,6 +10,12 @@ app.get('/', (req, res) => {
|
|||
res.send('Hello World!');
|
||||
});
|
||||
|
||||
app.get('/api/data', (req, res) => {
|
||||
res.json({ message: 'This is some data from the server!' });
|
||||
});
|
||||
|
||||
|
||||
|
||||
app.listen(port, '0.0.0.0', () => {
|
||||
console.log(`Server is running on port ${port}`);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue