Jeremy Lindsay
Jeremy Lindsay

Reputation: 139

Should Node.js only be used for "apps"?

Should Node.js be the basis of a website or be used only when certain functionality (eg. a chat room) is needed?

For example, in certain project, I'm using npm and have a node_modules folder and a package.json file in the main directory where all my code is.

However, the question I'm asking is whether or not this is good practice? Should Node.js only be used in, for example a chat-room/ folder? Or is it OK to use the same Node.js installation across an entire website, using when needed?

Upvotes: 0

Views: 74

Answers (1)

Cleriston
Cleriston

Reputation: 770

Many companies recently are having a hard job to detach their front end code from their server, hence, if you are starting a project from scratch, this is something you want to avoid.

Having low coupling applications will give you the flexibility to change your whole Front End stack without changing a single code in your API. Moreover, you will be able to use your API from different applications. They will now work independently.

The routing is how you define the URL, verb and opt parameters.

I hope that is what you have been struggling with.

Upvotes: 2

Related Questions