Skip to content

Conversation

@olawanlejoel
Copy link

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Sevalla is a modern cloud platform for hosting applications, databases, object storage and static sites, offering a simple and scalable deployment experience.

This PR introduces a new preset named sevalla, allowing users to easily deploy their Nitro apps to Sevalla with Node server support. The preset ensures compatibility and provides a straightforward deployment workflow.

Additionally, the documentation has been updated with a dedicated Sevalla deployment guide, making it easy for users to get started and configure their environment.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@vercel
Copy link

vercel bot commented Aug 27, 2025

@olawanlejoel is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@olawanlejoel olawanlejoel marked this pull request as ready for review August 27, 2025 12:39
@olawanlejoel olawanlejoel requested a review from pi0 as a code owner August 27, 2025 12:39
@pi0 pi0 changed the title add Sevalla to nitro (preset & docs) feat: add sevalla preset Aug 28, 2025
1. [Create a new app](https://docs.sevalla.com/applications/get-started/add-an-application) on Sevalla and connect it to your Git repository.
2. Set the **application name**, **region**, and **pod size** (you can start with 0.5 CPU / 1GB RAM).
3. Click **Create**, but skip the deploy step for now.
4. In your Sevalla application dashboard, click **Environment variables** on the sidebar and set `NITRO_PRESET` to `sevalla`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could svella CI somehow set this env? (or if it has a known env variable, we can add it to std-env for zero config

Copy link
Author

@olawanlejoel olawanlejoel Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to know how we can go about this internally. But at the moment this works this way. Can we maybe merge this way and then later the team can come back to this @pi0 .

```json [package.json]
{
"engines": {
"node": "22.x"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a hard requirement to deploy on svella or a recommendation? (If recommendation only, I suggest using a > [!TIP] note below and reducing initial steps)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually a hard requirement. Nixpacks is our default builder, and it uses Node 18, while modern Nitro apps require Node 20+.

Without specifying the Node version in package.json, deployments fail with an oxc-parser error related to optional dependencies. Setting "node": "22.x" in the engines field is necessary to ensure Nixpacks uses the correct Node version for the build.

I've updated the documentation to clarify this requirement and explain why it's needed.

const sevalla = defineNitroPreset(
{
extends: "node-server",
serveStatic: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't svella CDN serve static assets itself?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback! You're absolutely right. Sevalla offers a free Cloudflare-powered CDN that can serve static assets efficiently.

I've updated the preset to remove serveStatic: true and added a "Static Assets" section in the documentation explaining how users can enable Sevalla's CDN for optimal performance. I think this approach is cleaner and leverages Sevalla's infrastructure rather than having the Node server handle static files.

@pi0
Copy link
Member

pi0 commented Sep 1, 2025

@olawanlejoel feel free to join Nitro discord if you like to followup over chat.

@olawanlejoel
Copy link
Author

Hi @pi0, I attended to the comments you raised

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

Successfully merging this pull request may close these issues.

2 participants