mirror of
https://github.com/ION606/MailPocket.git
synced 2026-06-05 23:46:15 +00:00
moved to Docker
This commit is contained in:
@@ -14,4 +14,7 @@ require (
|
||||
modernc.org/mathutil v1.7.1 // indirect
|
||||
modernc.org/memory v1.8.2 // indirect
|
||||
modernc.org/sqlite v1.35.0 // indirect
|
||||
shared v0.0.0-00010101000000-000000000000 // indirect
|
||||
)
|
||||
|
||||
replace shared => ../shared
|
||||
|
||||
+4
-10
@@ -5,21 +5,15 @@ import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"shared"
|
||||
_ "modernc.org/sqlite"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var PORT string
|
||||
if len(os.Args) > 1 {
|
||||
PORT = os.Args[1]
|
||||
} else {
|
||||
PORT = "15521"
|
||||
}
|
||||
|
||||
db, _ := sql.Open("sqlite", "emails.db")
|
||||
PORT, dbdir := shared.GetArgs()
|
||||
db, _ := sql.Open("sqlite", filepath.Join(dbdir, "emails.db"))
|
||||
db.Exec(`CREATE TABLE IF NOT EXISTS emails (
|
||||
email TEXT PRIMARY KEY,
|
||||
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
|
||||
Reference in New Issue
Block a user