> For the complete documentation index, see [llms.txt](https://program.hackyourfuture.dk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://program.hackyourfuture.dk/trainee/technical-guides/deployment-quick-start.md).

# Deployment Quick Start

Deploying your apps to the web is a really satisfying part of development! There are many possibilities, and depending on the complexity of your app, it can get complicated.

This guide is to get you started with deploying a basic app, and a starting point to configuring more complex deployments yourself.

## Starting requirements

This guide assumes you have a full stack app in one repo, for example:

1. Your html files in e.g. `/public`
2. An executable server e.g. `server.js`
3. An optional sqlite database

## Steps

There are many tools that offer free deployment options. The one we use at HYF is [render.com](https://render.com).

1. Create an account on [render.com](https://render.com) if you don't have one already.
2. Find the option to create a new web service.

   ![New Web Service](/files/BlQ08Wf3IdP5p1lhyWUe)
3. Connect to the GitHub repository you wish to deploy.

   ![Connect to GitHub](/files/XS6HabfUN16VCwKbVeRv)
4. Most of the default settings should be fine, but make sure your it all looks correct. **It's important to select the Free plan**. The `Start Command` should also likely match the same command you use to start your server locally.

   ![Free Plan](/files/BLL5Hkr3EIMq1hZG8klk)
5. Click Deploy and wait for the build to finish. You will find the public url at the top of your service.

   ![Public URL](/files/5J9xoWLygZTLxfSrjdWm)
6. Everything should now be deployed!

## Tips

* Note that on the Free plan, if your service has inactivity for 15 minutes, it will shut down. If you try to access it again, it will need to restart, which can take up to a minute.
* If you're using an sqlite database in this setup, be aware that it will reset every time you redploy, so it is not suitable if you wish to persist new data across redeployments.

Using PostgreSQL? Or looking for a more in depth, advanced guide? Check out [HYF Project Template - Deployment Instructions](https://github.com/HackYourFuture-CPH/hyf-project-template?tab=readme-ov-file#deploying).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://program.hackyourfuture.dk/trainee/technical-guides/deployment-quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
