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.
Related
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.
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?
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.
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.
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.