How do you integrate APM server monitoring with NextJS server? - next.js

I want to integrate server monitoring system like DataDog that implements APM standards. I want to achieve this without using the custom server like Express or Koa, just using the out-of-box NextJS server. My NextJS server is only being used for pages, not APIs. It would help if NextJS allows us to insert middleware for all requests. However it doesn't look like that's an option. Do you know a good way to do this?

Related

Can I deploy a svelte-kit app on php hosting without nodejs?

I am familiar with svelte.js for client side wherein client and server are disconnected and all communication is via AJAX calls. However, I have a question whether shared hosting without node installation can deploy a sveltekit app?
Any comments are welcome.
Yes and no. You can serve static sveltekit pages generated with #sveltejs/adapter-static. If you want SSR or to use server side load functions, endpoint, or any other 'backend' feature of sveltekit you will need to use a different adapter. For that, you will need #sveltejs/adapter-node, or another adapter. For supported environments see this page of the docs. So yes, you will need a javascript runtime (probably nodejs) to use all of sveltekit's features.

Serverless vs Custom server Next.js

I currently try find out and make comparison of advantages and disadvantages of two approaches of building and running application on next.js:
Custom Server (currently used approach in my project)
Serverless (approach highly recommended by Next.Js team)
Serverless approach is described as highly recommended approach in Next.js documentation. They also advise to use Vercel, that has build in support for serverless approach in next.js.
My app is using azure cloud for hosting. My app is build and run as custom server approach. I will also use CDN to cache the pages.
Does anyone have experience in implementing next.js in azure infrastructure and CDN with use of:
Custom server approach?
Serverless approach?
Are there any pitfalls i should be aware? Which approach is better with azure and CDN? I saw discussion that Custom server approach may cause problems with caching content on CDN.

Stormpath React SPA user login

I'm developing a React app using webpack and intend to serve my app using nginx. Reading through the Stormpath examples I'm confused if I can develop a client side SPA since all the examples I've found use express to serve the application. I think it might be possible to keep my app running using the webpack dev server but will need to use the Stormpath rest API's rather than the React libraries.
I initially thought I would have server side code that would connect to Stormpath and my client code would connect to my server but I just can't find a example that shows this is possible.
For SPA applications, you can instruct our Express library to only respond to JSON requests, this esesntialy tells it to only expose the JSON API:
app.use(stormpath.init(app, {
web: {
produces: ['application/json']
}
}));
Then you can use a different mechanism, such as nginx, to serve the assets for your SPA. This information is in the Single Page Applications section of the Express-Stormpath documentation. I work at Stormpath and I'm more than happy to help! You can also get support through support#stormpath.com.

How to share Meteor Backend server with a Web and mobile app

I am working on an eCommerce project. I want to use amazing meteorjs for this project. I want to know is it possible to share meteor back end server( collections, methods, authentication) with a web and mobile app not just MongoDB. If its possible Please let me know how we can use the same Meteor backend server for multiple apps.
The Meteor client talks to the server using the simple DDP protocol. DDP clients have been written for a variety of other platforms, including Android and iOS.

Opensocial Application... what to use on the server side?

I would like to create an opensocial application. I have read about how to do this on the client side, my question is what is the most appropriate server side technology to use? My idea requires persistent data and business logic that should be stored and executed on a server. I have some familiarity with creating full blown web apps in ASP.NET and Ruby on Rails. Can I leverage those to build a complete opensocial app (with an iframe or something like that) or do I need to create only a back end using one of those technologies that will be accessed by javascript?
We're using Apache Shindig (Java) for a live project at http://www.lonelyplanet.com/groups
The website hosting the gadgets is written using Ruby on Rails, and all the business logic, data persistence etc is handled there.
We've injected custom handlers into Shindig to proxy everything to the Rails app using REST services. You can make Shindig do as much, or as little as you want. We've got it doing very little, and keeping all the app logic in the parent app hosting the main site. Shindig just serves up gadgets and handles security etc.

Resources