8000 updated · wpcodevo/golang-gorm-postgres@935af91 · GitHub
[go: up one dir, main page]

Skip to content

Commit 935af91

Browse files
committed
updated
1 parent c90cd27 commit 935af91

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ TODO.md
1818
logs.txt
1919
.idea/
2020
secret.md
21-
app.env
21+
tmp/

app.env

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
POSTGRES_HOST=127.0.0.1
2+
POSTGRES_USER=postgres
3+
POSTGRES_PASSWORD=password123
4+
POSTGRES_DB=golang-gorm
5+
POSTGRES_PORT=6500
6+
7+
PORT=8000
8+
CLIENT_ORIGIN=http://localhost:3000
9+
10+
EMAIL_FROM=admin@admin.com
11+
SMTP_HOST=smtp.mailtrap.io
12+
SMTP_USER=90cf952fb44469
13+
96DD SMTP_PASS=0524531956c552
14+
SMTP_PORT=587
15+
16+
TOKEN_EXPIRED_IN=60m
17+
TOKEN_MAXAGE=60
18+
19+
TOKEN_SECRET=my-ultra-secure-json-web-token-string

migrate/migrate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ func init() {
1818
}
1919

2020
func main() {
21+
initializers.DB.Exec("CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\"")
2122
initializers.DB.AutoMigrate(&models.User{})
2223
fmt.Println("👍 Migration complete")
2324
}

0 commit comments

Comments
 (0)
0