I have seen multiple backends built with Nestjs and Serverless Framework, like the International Slackline Association's Rating's backend. While that is great on it's own, given the deployment speed improvements of serverless-components, I would really like to be able to use Nestjs and the Serverless express component together.
To me this seems a natural fit as NestJS ships with express as a default, and the express serverless component uses aws-serverless-express internally. But I did not find any proper guides on how to go about implementing them together. An issue exists on serverless component's github page for asking the same, but has no replies.
Related
I developed a node Js application integrated with some services like database, authentication from Supabase, It works fine and gave success results in local development for each routes when called from Postman. Now I want to deploy this application to make rest APIs for frontend. Supabase provides edge-functions. In their documentation they told it is an alternative for firebase functions. But I can't able to find any documentation or blog regarding deployment of node Js application. Is there any way to deploy this application like firebase functions on edge functions of Supabase Any clarification related docs or alternative solutions would be helpful.
Supabase edge functions run Deno application at the moment, which is a bit different from a node.js application, so your node.js application will not deploy directly to Supabase edge functions. You would have to rewrite your code to make it compatible with a Deno application.
Luckily, since typescript, the language used in Deno functions is a superset of javascript, so you should be able to reuse a lot of the code during the rewrite!
I am new to node and typescript. I watched some tutorials explaining developing rest API using node, express with typescript in both class-based and function-based. I got some doubts there
Is it mandatory to go with class-based if we are using typescript or
can we use function-based too?
can we use the class-based implementation in JS also?
what is the difference or advantage (am aware of OOP) of using both
class-based and function-based implementation?
i need to develop an API backend that it should be :
robust
high performance
provides RESTFULL API
connected to a Mysql storage: i prefer a relation db for the
complexity
only backend not also frontend framework
I'm undecided between :
Lumen : i need only API service because i choose react js as frontend framework.. so i think is better lumen than laravel because i no need frontend
Nodejs api solution: In this moment searching on the web i found Seals and Loopback as framework for my api backend.
I find discortanti opinions ... some told that php solution as Lumen is not good for performance ( see http://www.infoworld.com/article/2866712/php/php-vs-node-js-an-epic-battle-for-developer-mind-share.html ).... and some one told that in this moment there arent reliable api backend framework in node js: seals is not good for performance and about loopback i found few comment... so i ask you what is the best choiche for performance and robust solution ..
I'd recommend Loopback. It has been acquired by IBM so you can expect continued improvement and stability.
If you think about JavaScript for client and server side then you can choose node.js with sails.js framework which is follow full MVC structure. If you use sails.js, you don't need to be expert in node.js. It's easy like other PHP framework like Laravel. For database you can use MongoDB. To work with different types of API include angular.js also. So finally your platform dependencies are:
1. Node.js (Server Side Coding)
2. Sails.js (For Maintain MVC Structure)
3. Angular.js (For Managing Frontend, HTTP request API etc)
4. MongoDB (For Database)
So that you will find out everything require your working development dependency. I think this will help for you.
Thank You :)
I have some experience in Nodejs/Express, Sequelize and jwt apps.
Recently I started looking at API Designing tools/Specs like RAML -- API Designer, Swagger -- Swagger Tools
I am wondering and I found no article linking or pointing out that how can I use swagger to create/design APIs and then use it in my nodejs/express app which uses Sequelize as an ORM.
JWT functionality is added on to middleware for authentication & authorization.
As I tested so far, I can export nodejs scaffolded app structure from Swagger-Editor using Server Code. On inspection, it actually routes the calls to swagger/YAML files.
How can I use sequelize alongside it?
Also, how do you guys go around from API Spec/Design to App (tools or workflow).
Please point where I am going wrong.
You can take a look at the official documentation here. The docs might be written for v1.7.0 but I can tell you it's still relevant for usage in the latest Sequelize version (I have an actual server running with this design approach).
While your actual app's folder structure might be different due to Swagger's structure, but the way you use Sequelize within your app remains the same.
People keep mentioning Node as a back-end framework but it's actually a runtime. Does this mean I need to install a package like Express in order to actually create a website based on the Node runtime? Does Node come with its' own implementation of a back-end framework?
Looking at the Node docs most of this stuff has nothing to do with usual framework stuff like testing, migrations, MVC, or asset precompilation.
It is not required to use Express or a similar framework to develop web pages since you can just create a web server using Node's http module.
That being said, the additional functionality that a framework like Express would provide is something you should at least consider.