Skip to content

Commit

Permalink
refactor: Update build process and script names
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroFnseca committed Sep 28, 2024
1 parent 952697e commit 70993d3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,18 @@ In this project, I'm using a Postgres database to store user information. The da
- Update the variables with your database credentials.

4. Running the Server:
- Enter the folder `scripts`:
```bash
cd scripts
```

- Using Docker (Linux):
```bash
./scripts/docker_run.sh
./docker_run.sh
```
- Without Docker (Linux):
```bash
./scripts/main_run.sh
./compiler.sh --run
```

5. Access the API at http://localhost:8080
Expand Down
8 changes: 0 additions & 8 deletions scripts/build.sh

This file was deleted.

13 changes: 13 additions & 0 deletions scripts/compiler.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
cd ..

set -e

mkdir -p bin

gcc -o bin/main src/*.c -lmicrohttpd -I/usr/include/postgresql -L/usr/lib/x86_64-linux-gnu -lpq

if [[ "$1" == "--run" ]]; then
echo "Executando a aplicação..."
./bin/main
fi
9 changes: 0 additions & 9 deletions scripts/main_run.sh

This file was deleted.

0 comments on commit 70993d3

Please sign in to comment.