You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
447B

  1. const express = require('express');
  2. const app = express();
  3. const port = 3000;
  4. const boatList = [];
  5. app.get('/', (req, res) => {
  6. res.send(boatList);
  7. });
  8. app.post('/', (req, res) => {
  9. res.send(createBoat(req.body));
  10. });
  11. app.listen(port, () => {
  12. console.log(`Example app listening at http://localhost:${port}`);
  13. });
  14. function createBoat(request) {
  15. // Boat validieren und "anlegen"
  16. }
  17. // boat class ersten
  18. class Boat {
  19. }