0
votes

I'm new to Node.js and built my first app helloworld.js. I know java and tomcat architecture well. But I have some questions:

  1. I wonder how to create a second web-app that always responds on the same port but with different url.

For example http://localhost:3000/ http://localhost:3000/app1/ http://localhost:3000/app2/

  1. I saw that there are different ways to access the various db. In the node js world there is something like hibernate that makes the dbms transparent to the programmer?
  2. There is something like tiles and tag library to build html page?
1

1 Answers

0
votes

In order:

  1. Unless you use nginx or some other reverse proxy, that is not possible. However, you can run different applications on different ports like 3001, 3002 etc, and run a server which acts as an intermediary between your client and these servers at port 3000.

  2. Depends on framework to framework.

  3. I am not familiar with tiles and tag, but in nodejs land, you can use ejs, handlebars or jade to design templates.