Closed binhe22 closed 3 months ago
Hi,
I have a question. I read the Dockerfile and the source code,
after we write the code to "/home/user/app/page.tsx",I didn't find the code to start the node.js server in the sandbox?
Did I missed something? Where is the code for starting the server?
Thanks
Hey, the code that starts the Nextjs server is done via the start command. It's currently not a great DX as it's a bit hidden for users - it's in the e2b.toml
file.
You specify the start command when you're building a custom template - https://e2b.dev/docs/cli/commands#template-build
In this AI artifacts example it's this
e2b template build -c "cd /home/user && npx next"
Just note that the default free sandbox might not have enough RAM. We just had another user doing this and the sandbox kept crashing because of OOM and they needed to create a sandbox with more RAM - https://e2b.dev/docs/sandbox/compute. I think we should consider allowing users on the free tier to have at least 1GB of RAM.
got it, thanks a lot
it works for me with the free tier (But i will pay for it haha)
Hi,
I have a question. I read the Dockerfile and the source code,
after we write the code to "/home/user/app/page.tsx",I didn't find the code to start the node.js server in the sandbox?
Did I missed something? Where is the code for starting the server?
Thanks