Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support hosting static pages #22

Open
anbraten opened this issue Mar 3, 2024 · 1 comment
Open

Support hosting static pages #22

anbraten opened this issue Mar 3, 2024 · 1 comment

Comments

@anbraten
Copy link
Member

anbraten commented Mar 3, 2024

Lagoss currently requires a function index file to be configured. Static projects wont have such a file by default and only contain static .html files and assets.

Possible options

  • Add a default index.js entryfile serving the index.html as needed.
  • Remove the need for an entryfile and implement routing into the serverless component
@anbraten
Copy link
Member Author

anbraten commented Mar 3, 2024

A script like this seems to allow basic static hosting:

export function handler(request: Request) {
    return new Response('', {
      status: 302,
      headers: {
        location: '/404.html',
      },
    });
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant