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

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.

Related

How do you integrate APM server monitoring with NextJS server?

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?

Blazor WebAssembly Authentication

I'm learning blazor and am having some difficulty wrapping my head around authentication. I have a .net core web api hosted and want to connect a blazor web assembly to it, but all the tutorials i find use it hosted in an asp.net core host in one package. How secure is the authentication when hosted like this on the same machine?
use Blazor WebAssembly with authentication (also if possible) is not a great idea:
usually, when you write a normal client-server application, the client collect the user typed data and send it to the server. In the server you can check if the password is correct (for example establishing a connection to a database and checking matches between username and password).
In Blazor WebAssembly, all the code is compiled, dll are generated, sent to the client (using the Web-Assembly technology) and runs inside a JavaScript sandbox. This mean that ALL the objects are available on client side and can be seen by the user, so also all the connection strings can be readed.
Also if there are some ways to mask them, none of them are 100% secure, actually.
If you don't need to have an off-line application I suggest you to use Blazor Server technology, that use SignalR.
However, if you really want to implement authentication in WebAssembly, you can take a look at the Microsoft documentation.
Hope this can be useful!
You can first go through the official docs. I also recommend you seeing this video. You'll likely need to use IdentityServer4, for that see this playlist and the official Github repo for sample projects.

Call a nodejs script from an asp.net Web API

We have a REST API currently built using ASP.NET Web API and it's hosted on Azure.
One of our methods needs to compile an email template using the MJML language. Only problem is that there isn't an asp.net compiler for MJML, it's written in Node.js and none of us here know anything about node except for having used it in gulp as part of our build process.
So I guess the question is, is there an easy way (preferably on Azure) to host the node script with an endpoint that can be called from our Web API and return the compiled template.
Just to be clear, I'm not asking how to use MJML or it's compiler, just how to host a script written in Node and easy send and receive data from it. To keep this inside of Azure would be a bonus.
Many thanks.

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.

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