-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,40 @@ | ||
# Development | ||
# Develop | ||
|
||
Install tooling: | ||
This guide explains how to set up a local development environment. | ||
|
||
1. Install tooling: | ||
|
||
```sh | ||
brew install [email protected] | ||
go install gotest.tools/gotestsum@latest | ||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | ||
go install github.com/air-verse/air@latest | ||
go install -tags 'sqlite3' github.com/golang-migrate/migrate/v4/cmd/migrate@latest | ||
brew install shellcheck | ||
``` | ||
|
||
Clone repository: | ||
|
||
```sh | ||
git clone [email protected]:ivov/n8n-shortlink.git && cd n8n-shortlink | ||
brew install [email protected] | ||
``` | ||
|
||
Create an alias: | ||
2. Clone repository: | ||
|
||
```sh | ||
echo "alias s.go='cd $(pwd)'" >> ~/.zshrc && source ~/.zshrc | ||
git clone [email protected]:ivov/n8n-shortlink.git | ||
``` | ||
|
||
Create a DB and run migrations: | ||
3. Create a DB at `~/.n8n-shortlink/n8n-shortlink.sqlite` and run migrations: | ||
|
||
```sh | ||
cd n8n-shortlink | ||
make db/create | ||
make db/mig/up | ||
``` | ||
|
||
For more commands, refer to the [Makefile](../Makefile): | ||
For all `Makefile` commands: | ||
|
||
```sh | ||
make help | ||
``` | ||
|
||
> [!IMPORTANT] | ||
> HTML files are embedded in the binary at compile time, so if you change them, you need to rebuild the binary, else use `make live` to start the server with live reload. | ||
> When developing locally, keep in mind that HTML files are embedded in the binary at compile time, so if you change HTML files, you need to rebuild the binary, else use `make live` to start the server with live reload. | ||
## Sample requests | ||
|
||
|