Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation #2

Open
davidkroell opened this issue Sep 25, 2020 · 4 comments
Open

Documentation #2

davidkroell opened this issue Sep 25, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@davidkroell
Copy link
Owner

Add or generate Api specification and documentation for this project.

@davidkroell davidkroell added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers hacktoberfest labels Sep 25, 2020
@RahilRehan
Copy link

I'll try this one.

@davidkroell
Copy link
Owner Author

Hi @RahilRehan, thanks for your time, there is already a file api.http with some requests there.
Maybe you can add a Github page or something to have web-based docs.

Regards, David

@RahilRehan
Copy link

RahilRehan commented Sep 30, 2020

I'm having issues setting up the project

Docker setup:
Alpine seems to have issues

runtime/cgo _cgo_export.c:3:10: fatal error: stdlib.h: No such file or directory 3 | #include <stdlib.h> | ^~~~~~~~~~ compilation terminated. FAIL github.com/davidkroell/shortcut/cache [build failed] The command '/bin/sh -c go test ./... -race' returned a non-zero code: 2

Local setup:
Throws error: Sql: unknown driver "" (forgotten import)

I was not able to find any solution, any help would be appreciated.

@davidkroell
Copy link
Owner Author

Hi @RahilRehan

I do not know the error from the Docker setup, but maybe this is caused by the same error on the local setup which states Sql: unknown driver "" (forgotten import).

I think this is caused by misconfiguration. This projects uses environment variables for configuration.
.env.example states the needed configuration to make this app work.

With docker you can either mount an environment file into the project directory (same as local setup configuration) or use the argument -e to specify the values seperately (or --env-file).

See: https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file

The .env file gets parsed here:

shortcut/main.go

Lines 21 to 24 in 637305a

err := godotenv.Load()
if err != nil {
log.Println("No .env file present. Environment not loaded from file")
}

If there is no .env file present, an error should be printed

Could you upload your whole docker run command for further debugging?
I think this should be documented somewhere in README.

Regards,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants