-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Go formatting CI check * Main.go formatted * go format * Change go module name to github repo and patched issue in integration scripts due to new init param
- Loading branch information
1 parent
1751659
commit f2b6d11
Showing
21 changed files
with
504 additions
and
503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ build/ | |
node_modules/ | ||
|
||
# Backend | ||
art-peace-backend | ||
/backend/backend |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package core | ||
|
||
import ( | ||
"fmt" | ||
"net/http" | ||
|
||
"github.com/gorilla/websocket" | ||
|
||
"github.com/keep-starknet-strange/art-peace/backend/config" | ||
) | ||
|
||
type Backend struct { | ||
Databases *Databases | ||
WSConnections []*websocket.Conn | ||
|
||
CanvasConfig *config.CanvasConfig | ||
BackendConfig *config.BackendConfig | ||
} | ||
|
||
var ArtPeaceBackend *Backend | ||
|
||
func NewBackend(databases *Databases, canvasConfig *config.CanvasConfig, backendConfig *config.BackendConfig) *Backend { | ||
return &Backend{ | ||
Databases: databases, | ||
CanvasConfig: canvasConfig, | ||
BackendConfig: backendConfig, | ||
} | ||
} | ||
|
||
func (b *Backend) Start() { | ||
fmt.Println("Listening on port", b.BackendConfig.Port) | ||
http.ListenAndServe(fmt.Sprintf(":%d", b.BackendConfig.Port), nil) | ||
} |
Oops, something went wrong.