Skip to content

Commit 8c78aa8

Browse files
committed
gorestapi: main go restapi + views
removed views for coneverting from ReactJS -> VueJS i know that i am changing the web frameworks many time gorestapi: TODO's added
1 parent 017192a commit 8c78aa8

20 files changed

+4
-11809
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
# builded binary of main.go
1111
gorestapi
1212

13+
# release folder
1314
release/

main.go

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,9 @@ var mainpage = "Hello World"
5656

5757
func main() {
5858

59-
// database, _ := sql.Open("sqlite3", "./database.db")
60-
// statement, _ := database.Prepare("CREATE TABLE IF NOT EXISTS user (uid INTEGER PRIMARY KEY, firstname TEXT, lastname TEXT)")
61-
// statement.Exec()
62-
// statement, _ = database.Prepare("INSERT INTO user (firstname, lastname) VALUES (?, ?)")
63-
// statement.Exec("Krish", "Pranav")
64-
// rows, _ := database.Query("SELECT uid, firstname, lastname FROM user")
65-
66-
// var id int
67-
// var fistname string
68-
// var lastname string
69-
70-
// for rows.Next() {
71-
// rows.Scan(&uid, &firstname, &lastname)
72-
// fmt.Println(strconv.Itoa(uid) + ": " + firstname + " " + lastname)
73-
// }
74-
75-
// databaseconnection()
76-
7759
router := gin.Default()
7860

79-
router.Use(static.Serve("/", static.LocalFile("./views/build/", true)))
61+
router.Use(static.Serve("/", static.LocalFile("./views/dist/", true)))
8062

8163
api := router.Group("/api")
8264
{
@@ -116,9 +98,8 @@ func main() {
11698
}
11799

118100
/**
119-
!!!!! TESTING !!!!!
120-
sqlite database connection is under testing
121-
*/
101+
* TODO: database connection is under development soon this will be integerated :)
102+
*/
122103
func databaseconnection() {
123104
database, _ := sql.Open("sqlite3", "./database.db")
124105
statement, _ := database.Prepare("CREATE TABLE IF NOT EXISTS user (uid INTEGER PRIMARY KEY, firstname TEXT, lastname TEXT)")

views/.gitignore

Lines changed: 0 additions & 23 deletions
This file was deleted.

views/README.md

Lines changed: 0 additions & 70 deletions
This file was deleted.

views/package.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

views/public/favicon.ico

-3.78 KB
Binary file not shown.

views/public/index.html

Lines changed: 0 additions & 43 deletions
This file was deleted.

views/public/logo192.png

-5.22 KB
Binary file not shown.

views/public/logo512.png

-9.44 KB
Binary file not shown.

views/public/manifest.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

views/public/robots.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

views/src/App.css

Lines changed: 0 additions & 38 deletions
This file was deleted.

views/src/App.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

views/src/App.test.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

views/src/index.css

Lines changed: 0 additions & 13 deletions
This file was deleted.

views/src/index.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

views/src/logo.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

views/src/reportWebVitals.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

views/src/setupTests.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)