Serving SPA on S3 - Question

Hello all,

I’ve never served a static site via S3 and I’m unsure how I would accomplish this with Adonis. I built an SPA using Webix and now I’m trying to figure out how to bypass Adonis views, as I just want to serve a traditional index.html file.

I’m sure this isn’t necessary in production, but I’d like to see how to get it working locally first.

Can anyone give me any tips/direction?


Hey @twigs67! :wave:

Instead of having Adonis serving the entry point of your SPA I’d recommend to simply run two servers locally. One that serves your SPA and the other one would be your Adonis API.


This is the same setup I have for my application on AWS, usually I would have two servers, one serving my API and the other serving my web pages.

1 Like

So I’m kind of confused how this would work. You serve the app/pages on one server that has the DNS setup at and then how would you setup the API server? Do you have it share the same DNS or I guess that the API server DNS is arbitrary.

let’s say you have an instance with the public IP you could have both API and the frontend pages set up on this IP.

the pages can have the DNS and the API can have this

Sorry for the late reply.

I generally use the primary domain for my front office ( and use a sub-domain for the api (

In my case, I serve my SPA with Netlify (free tier). That means point to my Netlify instance (CDN) and points to my server where my Adonis application reside.

1 Like

@romain.lanz - no worries. Thanks for the reply. I’ll check it out.