1

I have been using api.ai javascript SDK on angular to build my chat app to integrate it with the website. As this javascript sfk is deprecated I am now exploring to build the same on Node JS SDK with socket.io for real-time experience and angular for client features...

Currently, I'm following the below link to build my chat app https://codingblast.com/chat-application-angular-socket-io/

As I am very new to Node I have lots of doubt like...

  1. How to deploy my node and angular app on a server to host it on my website

  2. Angular and node can it be deployed as a simple app.. if so what are the steps and how could I achieve it.

  3. Is node is possible ti have multi threading as many users might chat with my chatbot in parallel before on angular it will be acheived by session id.. but how it is possible on the node?

  4. Is it fine to deploy my node app on my existing apache server or should I use separate server

  5. How can I host multiple node js chat app on a single server since each app will use a port... how much it is possible...

  6. Which server is recommended for node deployment windows ubuntu or Linux.

Please help me...

INDRAJITH EKANAYAKE
  • 3,894
  • 11
  • 41
  • 63

1 Answers1

0
  1. Angular Apps are static files that can be served using any server. For NodeJS, you will need a server that supports NodeJS runtime execution environment. A simple cloud server will do. (AWS or others that you may prefer)
  2. Angular runs on the client-side, NodeJS runs on the server-side, there is no "Simple App Deployment" (as far as I've known). You need to run the NodeJS server code which will server the REST API, and send the Angular deployment files to the client with some file server. (Even the NodeJS server can do it)
  3. "Node.js is a single threaded language which in background uses multiple threads to execute asynchronous code" [Source]
    But you can use "fork" to run parallel tasks. For chatbot, you may consider using WebSockets.
  4. It is possible to run NodeJS with Apache server, but how you want to deploy it depends on your decision and architecture. See HERE for more information.
  5. Link in no. 4 should have answer this this.
  6. NodeJS can be deployed on both Windows and Linux(Ubuntu) environment. It depends on how much you can spend, and how much benefit that expenditure will bring you. (Linux server operating systems are totally free, Windows servers aren't)
Arshad
  • 218
  • 3
  • 10