How nodejs or express works in angular framework? [closed] - node.js

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Need to know about mean stack development. How the node.js connects with angular. I know the one method which is connect angular by rest apis. So it same in MEAN ? We make apis with node&Express and call in angular app ? OR there is some other options too ?

If you want to use Angular, I think you need to first understand the difference between and the separation of frontend and backend.
Your frontend Angular application is an SPA (Single Page Application), which makes calles to another application. This is your API, which is your backend application. This could either be a PHP script or a NodeJS script (which could use Express or any other library that helps you building a REST API).
Get started by looking at how to build an Angular app and how to build a REST API with NodeJS and Express.

Related

Socket.io or Rest API [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I develop an application like Whatsapp using Vuejs and Nodejs. Can I create a backend for the entire application with Socket.io? Is it possible with Socket.io Rest api? I think there should be a Rest api in parts like the login. Is it true that I prepare parts like login with socket.io? Thanks in advance.
You can use a framework like NestJs or Adonis (or many others). Those that I'm mentioning are ready to build a REST service and also use websockets (with socket.io).
It is normal to use both in a project. The socket will be an open and persistent connection to the server, in the other case the http request is a petition, so ask yourself, Does this feature need constant communication with the server or could I ask for something and thats it??
Note: You can create a whole server using only sockets (socket.io in your case) but I think that a combination of ws + http is better

What is the TypeScript equivalent to the "server.js" file [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I am building an Angular project for my company as a POC for utilizing Azure Notification Hub to send push notifications.
The Microsoft Documentation instructs me to add the following code to server.js:
var azure = require('azure-sb');
However, I am building my app in TypeScript, not JavaScript, so I haven't created a server.js file. Is there a TypeScript (.ts) equivalent that I can create? Or can these types of operation only be done via JavaScript's server.js?
You have misunderstood or mistyped some things here.
Angular is a framework. It can be written with both javascript and typescript. Here is not angular your concern. Angular has nothing to do with server.js. Server.js is just used so that a server starts up based on your configurations. Nothing to do with angular.
Also server.js has nothing to do with Javascript or Typescript. It is just a file that is required from node.js which is an execution engine so that it can start a server which listens for requests.
Typescript always compiles to Javascript which then runs the project. Never typescript is used to execute an application. It always compiles to Javascript so that it can run.
So to your question
var azure = require('azure-sb');
That is javascript.
The equivalent in typescript would be
import { azure } from './azure-sb';
For more information about your last question check also here
relevant information from previous answer

Best node.js + postgresql web backend frame work for RESTful api? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm trying to build an app for web/android/iOS.
I'm thinking building a RESTful API backend using Node.js and PostgreSQL on a AWS AMI EC2 server.
However, I'm not really used to developing with Node.js. Hence, the questions:
1) What is a nice backend framework to build RESTful API with Node.js and PostgreSQL?
2) What is the best frontend framework for (1)?
I've searched for (1) and many said Express but the last one was answered in 2015. For (2), it seems people are divided: Angular, React, and Vue.
Help please.
for Backend use Express is the best option or you can use restify ,
and for Frontend use combination of EJS + VueJS
EJS (use for page rendering )
VueJS : create vue app in every page , use features for vue js (VueJS is 2nd highest starred on Github )
https://github.com/collections/front-end-javascript-frameworks

How can I make a desktop app with node.js in the backend for APIs [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
What would be the best set of technologies to use if I want to make a desktop application which would fetch data from server through JSON (node.js with MYSQL).
Side note: Currently we are using angular.js for frontend but the client wants a desktop app and is adamant. Don't want to change anything server side.
If you want to go ahead with js itself then you might want to look into electronjs you can even combine it with other frontend techs such as Angular, React or VueJs.
Another option is NW.js.
Look into both and choose as per your requirements both have pros and cons.

Redux and Nodejs combination/comparision [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Understood the concepts of Redux and Node theoretically - planning to use one of them? both? not sure - How do they compare to each other ? When creating a new app (using React for Example) - can we use both of them? or one of them should be enough? I am stuck with this question. What should be the criteria here? People with expertise with these technologies, please help.
nodejs is a library for writing server-side logic in javascript.
redux is a library for managing application state, either client-side or server-side.
For example, it is possible to build an application that uses redux to manage its state on the client. This application could then communicate to a server-side api that is built using nodejs. The server-side api could also be managing its local state using redux.
So you can see that the two technologies are not mutually exclusive, it is not nodejs or redux. Instead you can choose to use them for their respective purposes separately or in conjunction.

Resources