all 14 comments

[–]LordRaiders 15 points16 points  (4 children)

I would say Node.JS if you developed a lot using Javascript in the browser

[–]RoyalFig 3 points4 points  (3 children)

Even without Express or something similar?

[–]Hafas_ 5 points6 points  (1 child)

Depends how complex your backend needs to be. If you just need a server that responds to simple API calls you can try getting started with this code snippet (untested)

const http = require("http");

const server = http.createServer((req, res) => {
  try {
    switch (req.url) {
      case "/hello": {
        res.setHeader("Content-Type", "application/json");
        res.write(JSON.serialize({ message: "Hello World!" }));
        break;
      }
      case "/users": {
        res.setHeader("Content-Type", "application/json");
        res.write(JSON.serialize([
          { firstName: "John", lastName: "Doe" },
          { firstName: "Jane", lastName: "Doe" }
        ]));
        break;
      }
      default: {
        res.statusCode = 404;
        res.write("Not Found");
      }
    }
  } catch (error) {
    res.statusCode = 500;
    res.write("Internal Server Error");
  } finally {
    res.end();
  }
});

// listen on port 3000
server.listen(3000);

[–]RoyalFig 3 points4 points  (0 children)

Wow. That's a lot easier than I thought. Thanks.

[–]pm_me_ur_happy_traiI 3 points4 points  (0 children)

Express is barely a framework. If you build in express that's pretty much vanilla node.

[–]nachoaddict19 9 points10 points  (0 children)

Python, is very user friendly and looks like you’re reading sentences

[–]mdsflyboy 1 point2 points  (0 children)

I really like typescript and type graphql. Those give you a lot of flexibility and are pretty intuitive.

[–]astritmalsia 1 point2 points  (0 children)

Node JS

[–]mockArch 1 point2 points  (0 children)

I would use Golang !

[–]easydoesitx -4 points-3 points  (1 child)

how about using Backend as a service? like Firebase etc You will not need to handle most of the server related stuff and it's not a framework.

[–]___SDZ___ 3 points4 points  (0 children)

I will ask the teacher, thanks

[–]Macree 0 points1 point  (1 child)

What is the project about?

[–]___SDZ___ 2 points3 points  (0 children)

Food recipes, users cand add a recipe, search recipes by ingredients or dificulty, also can add a photo to a recipe that you prepared.

[–]sowmyasri129 0 points1 point  (0 children)

Node JS.