|
|
|
|
@ -64,6 +64,11 @@ app.post('/api/measurements', (req, res) => {
|
|
|
|
|
res.status(201).json(measurement);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// GET
|
|
|
|
|
app.get('/api/measurements', (req, res) => {
|
|
|
|
|
res.json(measurements);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// starting the listening service
|
|
|
|
|
app.listen(3030, () => {
|
|
|
|
|
console.log('Server running at http://localhost:3030');
|
|
|
|
|
|