Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
public-templates
golang-template
gin-template-project
Commits
3cefbbbd
There was an error fetching the commit references. Please try again later.
Commit
3cefbbbd
authored
9 months ago
by
Somnath Ghorpade
Browse files
Options
Downloads
Patches
Plain Diff
added gitignore file and also changes config path in compose file.
parent
8d215c20
1 merge request
!2
added gitignore file and also changes config path in compose file.
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+4
-0
.gitignore
README.md
+7
-0
README.md
docker-compose.yml
+1
-2
docker-compose.yml
servers/main.go
+1
-2
servers/main.go
with
13 additions
and
4 deletions
.gitignore
0 → 100644
+
4
−
0
View file @
3cefbbbd
logs/
servers/logs/
servers/configs/database.json
configs/database.json
\ No newline at end of file
This diff is collapsed.
Click to expand it.
README.md
+
7
−
0
View file @
3cefbbbd
...
@@ -52,6 +52,13 @@ Golang Gin web framework template project
...
@@ -52,6 +52,13 @@ Golang Gin web framework template project
Note: All Immudb operations' result is in Base64 format.
Note: All Immudb operations' result is in Base64 format.
## Docker usage
```
To run project on your local please follow steps
- Kindly install docker and docker-compose latest version on your local machine
- Run command docker-compose up on you command prompt
```
## database json format
## database json format
...
...
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
1
−
2
View file @
3cefbbbd
version
:
'
3'
version
:
'
3'
services
:
services
:
gogintemplate
:
gogintemplate
:
build
:
build
:
...
@@ -9,4 +8,4 @@ services:
...
@@ -9,4 +8,4 @@ services:
-
"
3000:3000"
-
"
3000:3000"
volumes
:
volumes
:
-
./logs:/application/logs
-
./logs:/application/logs
-
./configs:/application/configs
-
./configs:/application/servers/configs
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
servers/main.go
+
1
−
2
View file @
3cefbbbd
...
@@ -8,7 +8,6 @@ import (
...
@@ -8,7 +8,6 @@ import (
"golangtemplate/servers/common"
"golangtemplate/servers/common"
"golangtemplate/servers/middleware"
"golangtemplate/servers/middleware"
"golangtemplate/servers/routes"
"golangtemplate/servers/routes"
"io/ioutil"
"net"
"net"
"os"
"os"
"path/filepath"
"path/filepath"
...
@@ -108,7 +107,7 @@ func initializeAll(g *gin.Engine) error {
...
@@ -108,7 +107,7 @@ func initializeAll(g *gin.Engine) error {
routes
.
Init
(
g
)
routes
.
Init
(
g
)
// read file and initialise mongo connection
// read file and initialise mongo connection
content
,
err
:=
ioutil
.
ReadFile
(
models
.
ConfigPath
)
content
,
err
:=
os
.
ReadFile
(
models
.
ConfigPath
)
if
err
!=
nil
{
if
err
!=
nil
{
loggermdl
.
LogError
(
err
)
loggermdl
.
LogError
(
err
)
return
err
return
err
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets