W
Wasp-langyanchok

Running the backend as a regular node.js app?

Hi, I'm wondering if it's possible to run the backend as a regular node.js application like 'npm start' instead of using docker? If not why?
M
miho17d ago
Wasp compiles to just regular Resct app and regular Node.js app. You are free to deploy it in any way you like. https://wasp-lang.dev/docs/advanced/deployment/manually read more in the manual deployment docs
Deploying Manually | Wasp
This document explains how to build and prepare your Wasp app for deployment.
M
miho17d ago
We used docker to deploy the server on Fly since it's what worked the best for us and docker is kinda the industry standard. 🤗
Y
yanchok17d ago
Thank you! I thought I couldn't run it as a normal node.js app because I was getting an error. Turns out I didn't bundle because the npm run bundle command isn't mentioned in the readme
M
miho17d ago
Oh that's a good catch! Which README were you following? 🙂
Y
yanchok17d ago
The one in /app/.wasp/build/server I found the commands in the package.json, but that's not very intuitive 😄 Also I don't find anithing in the docs mentioning that you need to bundle it in order to run it
M
martinsos17d ago
@yanchok so you can run it manually as a regular node app, but indeed there are steps that need to happen in order to have that work. And those steps are basically documented in the Dockerfile we generate -> so the best thing would be too look into how Dockerfile is defined, and replicating relevant steps directly on your machine where you want to run the backend.
Y
yanchok17d ago
yeah, but still I think it will be good the commands to be described in the readme. Can I update the readme?
M
martinsos17d ago
@yanchok you are probably right! It does put some additional burden on us though, because then we also have to maintain that piece of docs. Maybe we could something in the docs like "check Dockerfile to figure out how to deploy it on your machine without Docker" + some examples hm. Or, we should be more precise and describe it exactly. If you want to give it a try that would be great -> you can make a PR toward our docs! You mentioned README, but docs are probably the right place for this. What you will want to do is going to this page in docs https://wasp-lang.dev/docs/advanced/deployment/manually and adding this content to it. Maybe it could be a new section, called "Deploying the API Server without Docker"? You can just scroll to the bottom of the page and click "Edit this page" and it will allow you to edit it direclty in the browser and make a PR. Or you can clone the wasp repo, go into docs there and make a PR that way.
Y
yanchok17d ago
Ok, I'll update them later
M
martinsos17d ago
@yanchok if you find that too complex / hard, you can create a GH issue describing how you got it working (which commands you used) and we can use that information later to update the docs properly, that will also be helpful.
M
martinsos17d ago
Actually, I just remembered we already have a GH issue about this, check it out: https://github.com/wasp-lang/wasp/issues/1481 . It even links to a previous Discord convo where we helped another person get it running, you might find it helpful.
GitHub
Deployment to bare metal · Issue #1481 · wasp-lang/wasp
We should write a piece about deploying Wasp to bare metal and/or with Docker container + docker-compose.yml Using Caprover (self-hosted PaaS) Deploy script #!/bin/bash set -e set -u set -o pipefai...
M
martinsos17d ago
This is that previous DIscord convo: https://discord.com/channels/686873244791210014/1171112746633400462/1171112746633400462 . Note however that this was some time ago, and Wasp changed quite a bit in the meantime, so those commands are probalby not correct anymore.
Y
yanchok17d ago
No problem, I will write it. I can post it here if you want to discuss the text before i make a pr
M
MEE617d ago
Wohooo @yanchok, you just became a Waspeteer level 3!
Want results from more Discord servers?
Add your server
More Posts
Where to startIm a UI designer dabbling in trying to create my first app w/ GitHub code pilot as I’m not a developrunning wasp inside google idx errorI am trying to setup the dev environment test out opensaas with google online ide idx, but when I trApp crashed for unknowing reasonHey, I start the app when it's still v-0.12.0, it works fine till today, nothing changed on my end btrying to run wasp.sh server on dockerHey guys, so I tried dockerising wasp-sh after I saw it on your recent reddit post. 1. I created aConfused about [Client ]HMR[Wasp 0.13.0, MacOs] Hey guys, I am trying to update wasp header/nav bar to a new style with framerIssue with deploying my wasp app to fly.ioI'm trying to deploy my wasp app to fly.io, but I'm encountering an error that doesn't make sense. Whas anyone got shadcn to work with wasp? I am trying but keep getting an errorAttached is the error I am currently getting. Just wondering if anyone has had success with it?"wasp start db" takes too much time.Any solution for this? i seem to be stuck in a loop and i can't do "Wasp start" until this resolves.Best Practices for Implementing Auth System in Chrome Extension Connected to OpenSaaSHello, everyone! I'm currently developing a SaaS product and have created a Chrome extension. I'm aCompile / Parse error with the ToDoApHello all , I just downloaded and installed Wasp on Windows 11 with WSL2. The installation wenPossibility to disable wasp reload on UI file changes?Hey my dudes, is it possible to calm down this guy on the screenshot from reloading everything everyWhat's the best way to start with Wasp?I'm looking for the best way to start with learning Wasp.onAuthSucceededRedirectTo previous siteWhen I open a Link in my app where Auth is required but my session expired, I get redirected to the Is there something missing? :(I'm following this guide. https://wasp-lang.dev/blog/2023/11/21/guide-windows-development-wasp-wsl Bdynamic variables in main.waspIs it currently possible to dynamically change configuration values in main.wasp? E.g for developmGoogle Auth in ProdI made my first try with the wasp deployment. So far its pretty straightforward, directly deploy to How can I get current theme colors and set them to div ?I want to set background of a div according to the current selected theme. if dark theme is selecteCalling queries without useQuery hookHi, I'm trying to call a query directly, from the client, without using the hook, but couldn't figurchat gpt integration docshi, is it possible to read some docs on chat gpt integration with wasp? I think it can be useful forAxiosErrorHi! I'm encountering an error where the simple query for the demo ToDoApp using an SQLite DB, does n