test markdown change to test PR automation

This commit is contained in:
FifthWit 2025-12-02 23:44:36 -06:00
parent eaa0ac8124
commit 121b76e8a3

View file

@ -1,12 +1,17 @@
# BackendV2 # BackendV2
follow me on [GitHub](https://github.com/FifthWit) follow me on [GitHub](https://github.com/FifthWit)
BackendV2 is a from scratch rewrite of movie-web's backend using [Nitro](https://nitro.build), and [Prisma](https://prisma.io). BackendV2 is a from scratch rewrite of movie-web's backend using [Nitro](https://nitro.build), and [Prisma](https://prisma.io). a,flkdnasouiaiuwgawg
## Deployment ## Deployment
There are multiple supported ways to deploy BackendV2 based on your needs: There are multiple supported ways to deploy BackendV2 based on your needs:
### NixPacks ### NixPacks
1. Install NixPacks with 1. Install NixPacks with
```sh ```sh
# Mac # Mac
brew install nixpacks brew install nixpacks
@ -15,22 +20,30 @@ curl -sSL https://nixpacks.com/install.sh | bash
# Windows # Windows
irm https://nixpacks.com/install.ps1 | iex irm https://nixpacks.com/install.ps1 | iex
``` ```
2. Build the backend 2. Build the backend
```sh ```sh
nixpacks build ./path/to/app --name my-app # my-app will be the container name aswell nixpacks build ./path/to/app --name my-app # my-app will be the container name aswell
``` ```
3. Run the container 3. Run the container
```sh ```sh
docker run my-app docker run my-app
``` ```
> [!TIP] > [!TIP]
If you use a tool like Dokploy or Coolify, NixPacks support is out of the box > If you use a tool like Dokploy or Coolify, NixPacks support is out of the box
### Railpack ### Railpack
Railpack is the successor to NixPacks, to run the backend via Railpack: Railpack is the successor to NixPacks, to run the backend via Railpack:
1. Install [Railpack](https://railpack.com/installation) 1. Install [Railpack](https://railpack.com/installation)
2. Run BuildKit and set BuildKit host 2. Run BuildKit and set BuildKit host
```sh ```sh
docker run --rm --privileged -d --name buildkit moby/buildki docker run --rm --privileged -d --name buildkit moby/buildki
@ -38,12 +51,14 @@ export BUILDKIT_HOST='docker-container://buildkit'
``` ```
3. Build Backend 3. Build Backend
```sh ```sh
cd ./path/to/backend cd ./path/to/backend
railpack build . railpack build .
``` ```
4. Run Backend container 4. Run Backend container
```sh ```sh
# Run manually # Run manually
docker run -it backend docker run -it backend
@ -52,29 +67,39 @@ docker run -d -it backend
``` ```
5. Verify it's running 5. Verify it's running
```sh ```sh
docker ps docker ps
# You should see backend, and buildkit running # You should see backend, and buildkit running
``` ```
### Manually ### Manually
1. Git clone the environment 1. Git clone the environment
```sh ```sh
git clone https://github.com/p-stream/backend.git git clone https://github.com/p-stream/backend.git
cd backend cd backend
``` ```
2. Build the backend 2. Build the backend
```sh ```sh
npm install && npm run build npm install && npm run build
``` ```
3. Run the backend 3. Run the backend
```sh ```sh
node .nitro/index.mjs node .nitro/index.mjs
``` ```
## Setup your environment variables: ## Setup your environment variables:
To run the backend you need environment variables setup To run the backend you need environment variables setup
1. Create .env file 1. Create .env file
```sh ```sh
cp .env.example .env cp .env.example .env
``` ```
@ -85,15 +110,18 @@ cp .env.example .env
> for postgres you may want to use a service like [Neon](https://neon.tech) or host your own with docker, to do that just look it up > for postgres you may want to use a service like [Neon](https://neon.tech) or host your own with docker, to do that just look it up
## Contributing ## Contributing
We love contributors, it helps the community so much, if you are interested in contributing here are some steps: We love contributors, it helps the community so much, if you are interested in contributing here are some steps:
1. Clone the repo 1. Clone the repo
```sh ```sh
git clone https://github.com/p-stream/backend.git git clone https://github.com/p-stream/backend.git
cd backend cd backend
``` ```
2. Install Deps/Run the backend 2. Install Deps/Run the backend
```sh ```sh
npm install && npm run dev npm install && npm run dev
``` ```
@ -103,10 +131,11 @@ npm install && npm run dev
4. Make your changes! Go crazy, so long as you think it is helpful we'd love to see a Pull Request, have fun, this project is FOSS and done in my our maintainers free time, no pressure, just enjoy yourself 4. Make your changes! Go crazy, so long as you think it is helpful we'd love to see a Pull Request, have fun, this project is FOSS and done in my our maintainers free time, no pressure, just enjoy yourself
### Philosophy/Habits for devs ### Philosophy/Habits for devs
Here is a general rule of thumb for what your changes and developments should look like if you plan on getting it merged to the main branch: Here is a general rule of thumb for what your changes and developments should look like if you plan on getting it merged to the main branch:
- Use Prettier & ESLint: We aren't going to be crazy if it's not well formatted but by using the extensions it keeps our code consistent, which makes it a lot easier for maintainers to help merge your code - Use Prettier & ESLint: We aren't going to be crazy if it's not well formatted but by using the extensions it keeps our code consistent, which makes it a lot easier for maintainers to help merge your code
- Keep it minimal, things like Email are out of the question, we want to keep it small, if you think that it's **really** needed, make an issue on our GitHub to express your interest in it, and a maintainer will confirm or deny whether we would merge it - Keep it minimal, things like Email are out of the question, we want to keep it small, if you think that it's **really** needed, make an issue on our GitHub to express your interest in it, and a maintainer will confirm or deny whether we would merge it
- Understand our tech stack, this is a generic piece of advice but if you haven't use NitroJS for example, read their docs and make sure you're familiar with the framework, it makes your code quality much better, and makes reviewing much easier - Understand our tech stack, this is a generic piece of advice but if you haven't use NitroJS for example, read their docs and make sure you're familiar with the framework, it makes your code quality much better, and makes reviewing much easier
Star this repo and please follow me on [GitHub](https://github.com/FifthWit)! Star this repo and please follow me on [GitHub](https://github.com/FifthWit)!