Hosting a Wasp project?
Hi, I recently have created a webapp using Wasp. But the wasp docs are a little confusing with how hosting works. In my experience, when I've completed websites in the past, I just throw everything (frontend, backend, db) into docker containers and run it all off a cheap $4/month vps, or my own home server. I see most of the options require 2 different services, 1 for the frontend and a complete different service for the frontend and backend? Why is that? What's stopping us from just running everything off the same server? I'm a bit confused and would really appreciate someone explaining hosting to me.
1 Reply
Hi @jason. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
You're right that the deployment process for Wasp apps can seem a bit different from what you're used to. Let me clarify this for you based on the information from the Wasp documentation.
Wasp apps are full-stack applications consisting of three main parts:
1. A Node.js server (backend)
2. A static client (frontend)
3. A PostgreSQL database
While Wasp does offer deployment options that separate these components, it's important to note that you're not required to use separate services for hosting. As stated in the Deployment Overview documentation:
"You can deploy each part anywhere where you can usually deploy Node.js apps or static apps."
This means you can indeed host everything on a single server if that's your preference. The documentation mentions this flexibility:
"For example, you can deploy your client on Netlify, the server on Fly.io, and the database on Neon."
However, this is just an example, not a requirement.
The reason Wasp offers deployment options with separate services is that it can provide certain advantages in terms of scalability, performance, and ease of management for some users. However, if you're comfortable with your current approach of using Docker containers on a single VPS or home server, you can certainly continue to do so with a Wasp app.
To deploy your Wasp app using your preferred method, you would:
1. Use
wasp build
to generate deployable code for your entire app.
2. Deploy the generated code using your usual Docker setup.
You might find the section on Deploying Manually helpful, as it breaks down the components you'll need to deploy.
Remember, Wasp is designed to be flexible. While it offers streamlined deployment options, it doesn't prevent you from using your preferred hosting method. If you're comfortable with your current setup, you can continue to use it with your Wasp app.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @jason, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?