diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 055a25c2..2b74ffe1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,5 +3,5 @@ npm run dist go mod vendor -go run backend/cmd/webcli/webcli.go start --config ./config.yaml +go run backend/cmd/fasten/fasten.go start --config ./config.yaml ``` \ No newline at end of file diff --git a/README.md b/README.md index 3fc4883e..8619fe5f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Find & replace the following -- `packagrio/goweb-template` - replace this with your github project name (owner/reponame) -- `webcli` - find and replace this with your binary name +- `fastenhealth/fastenhealth-onprem` - replace this with your github project name (owner/reponame) +- `fastenhealth` - find and replace this with your binary name - make sure you rename the folder as well. diff --git a/backend/cmd/webcli/webcli.go b/backend/cmd/fasten/fasten.go similarity index 83% rename from backend/cmd/webcli/webcli.go rename to backend/cmd/fasten/fasten.go index 60ca921b..952724bc 100644 --- a/backend/cmd/webcli/webcli.go +++ b/backend/cmd/fasten/fasten.go @@ -4,10 +4,28 @@ import ( "encoding/json" "fmt" "github.com/analogj/go-util/utils" - "github.com/packagrio/goweb-template/backend/pkg/config" - "github.com/packagrio/goweb-template/backend/pkg/errors" - "github.com/packagrio/goweb-template/backend/pkg/version" - "github.com/packagrio/goweb-template/backend/pkg/web" + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/config" + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/errors" + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/version" + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/web" + "github.com/sirupsen/logrus" + "github.com/urfave/cli/v2" + "io" + "log" + "os" + "time" +) + +\ + +import ( + "encoding/json" + "fmt" + "github.com/analogj/go-util/utils" + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/config" + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/errors" + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/version" + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/web" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" "io" @@ -48,7 +66,7 @@ func main() { }, Before: func(c *cli.Context) error { - packagrUrl := "github.com/packagrio/goweb-template" + packagrUrl := "github.com/fastenhealth/fastenhealth-onprem" versionInfo := fmt.Sprintf("%s.%s-%s", goos, goarch, version.VERSION) @@ -69,7 +87,7 @@ func main() { Commands: []*cli.Command{ { Name: "start", - Usage: "Start the webcli server", + Usage: "Start the fasten server", Action: func(c *cli.Context) error { //fmt.Fprintln(c.App.Writer, c.Command.Usage) if c.IsSet("config") { diff --git a/backend/pkg/config/config.go b/backend/pkg/config/config.go index aee316a1..4b8902a7 100644 --- a/backend/pkg/config/config.go +++ b/backend/pkg/config/config.go @@ -3,7 +3,7 @@ package config import ( "fmt" "github.com/analogj/go-util/utils" - "github.com/packagrio/goweb-template/backend/pkg/errors" + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/errors" "github.com/spf13/viper" "log" "os" @@ -24,7 +24,7 @@ func (c *configuration) Init() error { c.SetDefault("web.listen.port", "8080") c.SetDefault("web.listen.host", "0.0.0.0") c.SetDefault("web.listen.basepath", "") - c.SetDefault("web.src.frontend.path", "/opt/webcli/web") + c.SetDefault("web.src.frontend.path", "/opt/fasten/web") c.SetDefault("log.level", "INFO") c.SetDefault("log.file", "") @@ -37,7 +37,7 @@ func (c *configuration) Init() error { c.AddConfigPath("$HOME/") //configure env variable parsing. - c.SetEnvPrefix("PACKAGR") + c.SetEnvPrefix("FASTEN") c.SetEnvKeyReplacer(strings.NewReplacer("-", "_", ".", "_")) c.AutomaticEnv() //CLI options will be added via the `Set()` function diff --git a/backend/pkg/web/handler/hello_world.go b/backend/pkg/web/handler/hello_world.go index 1e439063..f5c05931 100644 --- a/backend/pkg/web/handler/hello_world.go +++ b/backend/pkg/web/handler/hello_world.go @@ -1,9 +1,9 @@ package handler import ( - //"github.com/packagrio/goweb-template/backend/pkg/database" + //"github.com/fastenhealth/fastenhealth-onprem/backend/pkg/database" "github.com/gin-gonic/gin" - //"github.com/packagrio/goweb-template/backend/pkg/config" + //"github.com/fastenhealth/fastenhealth-onprem/backend/pkg/config" //"github.com/sirupsen/logrus" "net/http" ) diff --git a/backend/pkg/web/middleware/config.go b/backend/pkg/web/middleware/config.go index 9a801bec..88d2343a 100644 --- a/backend/pkg/web/middleware/config.go +++ b/backend/pkg/web/middleware/config.go @@ -1,8 +1,8 @@ package middleware import ( + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/config" "github.com/gin-gonic/gin" - "github.com/packagrio/goweb-template/backend/pkg/config" ) func ConfigMiddleware(appConfig config.Interface) gin.HandlerFunc { diff --git a/backend/pkg/web/server.go b/backend/pkg/web/server.go index b83f4ce2..a33001f8 100644 --- a/backend/pkg/web/server.go +++ b/backend/pkg/web/server.go @@ -2,10 +2,10 @@ package web import ( "fmt" + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/config" + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/web/handler" + "github.com/fastenhealth/fastenhealth-onprem/backend/pkg/web/middleware" "github.com/gin-gonic/gin" - "github.com/packagrio/goweb-template/backend/pkg/config" - "github.com/packagrio/goweb-template/backend/pkg/web/handler" - "github.com/packagrio/goweb-template/backend/pkg/web/middleware" "github.com/sirupsen/logrus" "net/http" "strings" diff --git a/config.yaml b/config.yaml index 59b67575..551731c2 100644 --- a/config.yaml +++ b/config.yaml @@ -2,7 +2,7 @@ # Version # # version specifies the version of this configuration file schema, not -# the webcli binary. There is only 1 version available at the moment +# the fasten binary. There is only 1 version available at the moment version: 1 web: @@ -10,15 +10,15 @@ web: port: 8080 host: 0.0.0.0 - # if you're using a reverse proxy like apache/nginx, you can override this value to serve webcli on a subpath. - # eg. http://example.com/webcli/* vs http://example.com:8080 - # basepath: `/webcli` + # if you're using a reverse proxy like apache/nginx, you can override this value to serve fasten on a subpath. + # eg. http://example.com/fasten/* vs http://example.com:8080 + # basepath: `/fasten` # leave empty unless behind a path prefixed proxy basepath: '' src: # the location on the filesystem where webapp javascript + css is located frontend: - path: /opt/webcli/web + path: /opt/fasten/web # path: ./dist log: diff --git a/frontend/README.md b/frontend/README.md index 3236a01a..f8b1365b 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,4 +1,4 @@ -# Webcli +# fastenhealth This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.4. diff --git a/frontend/angular.json b/frontend/angular.json index 5558bdae..8c820447 100644 --- a/frontend/angular.json +++ b/frontend/angular.json @@ -3,7 +3,7 @@ "version": 1, "newProjectRoot": "projects", "projects": { - "webcli": { + "fastenhealth": { "projectType": "application", "schematics": { "@schematics/angular:component": { @@ -17,7 +17,7 @@ "build": { "builder": "@angular-devkit/build-angular:browser", "options": { - "outputPath": "dist/webcli", + "outputPath": "dist/fastenhealth", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", @@ -66,18 +66,18 @@ "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { - "browserTarget": "webcli:build" + "browserTarget": "fastenhealth:build" }, "configurations": { "production": { - "browserTarget": "webcli:build:production" + "browserTarget": "fastenhealth:build:production" } } }, "extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n", "options": { - "browserTarget": "webcli:build" + "browserTarget": "fastenhealth:build" } }, "test": { @@ -114,15 +114,15 @@ "builder": "@angular-devkit/build-angular:protractor", "options": { "protractorConfig": "e2e/protractor.conf.js", - "devServerTarget": "webcli:serve" + "devServerTarget": "fastenhealth:serve" }, "configurations": { "production": { - "devServerTarget": "webcli:serve:production" + "devServerTarget": "fastenhealth:serve:production" } } } } }}, - "defaultProject": "webcli" + "defaultProject": "fastenhealth" } diff --git a/frontend/e2e/src/app.e2e-spec.ts b/frontend/e2e/src/app.e2e-spec.ts index 6853b696..0a78f33f 100644 --- a/frontend/e2e/src/app.e2e-spec.ts +++ b/frontend/e2e/src/app.e2e-spec.ts @@ -10,7 +10,7 @@ describe('workspace-project App', () => { it('should display welcome message', () => { page.navigateTo(); - expect(page.getTitleText()).toEqual('webcli app is running!'); + expect(page.getTitleText()).toEqual('fastenhealth app is running!'); }); afterEach(async () => { diff --git a/frontend/karma.conf.js b/frontend/karma.conf.js index a77ba12c..9901989c 100644 --- a/frontend/karma.conf.js +++ b/frontend/karma.conf.js @@ -16,7 +16,7 @@ module.exports = function (config) { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { - dir: require('path').join(__dirname, './coverage/webcli'), + dir: require('path').join(__dirname, './coverage/fasten'), reports: ['html', 'lcovonly', 'text-summary'], fixWebpackSourcePaths: true }, diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f8915b0c..0295161b 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,11 +1,11 @@ { - "name": "webcli", + "name": "fastenhealth", "version": "0.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "webcli", + "name": "fastenhealth", "version": "0.0.0", "dependencies": { "@angular/animations": "~9.1.4", diff --git a/frontend/package.json b/frontend/package.json index f805cb13..a2ac7bd7 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,5 +1,5 @@ { - "name": "webcli", + "name": "fasten", "version": "0.0.0", "scripts": { "ng": "ng", diff --git a/frontend/src/app/app.component.spec.ts b/frontend/src/app/app.component.spec.ts index 3a6f5a9d..0423b7e4 100644 --- a/frontend/src/app/app.component.spec.ts +++ b/frontend/src/app/app.component.spec.ts @@ -20,16 +20,16 @@ describe('AppComponent', () => { expect(app).toBeTruthy(); }); - it(`should have as title 'webcli'`, () => { + it(`should have as title 'fastenhealth'`, () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; - expect(app.title).toEqual('webcli'); + expect(app.title).toEqual('fastenhealth'); }); it('should render title', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.nativeElement; - expect(compiled.querySelector('.content span').textContent).toContain('webcli app is running!'); + expect(compiled.querySelector('.content span').textContent).toContain('fastenhealth app is running!'); }); }); diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index f752e5f2..8b3eaf29 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -6,5 +6,5 @@ import { Component } from '@angular/core'; styleUrls: ['./app.component.scss'] }) export class AppComponent { - title = 'webcli'; + title = 'fastenhealth'; } diff --git a/frontend/src/index.html b/frontend/src/index.html index 9d055597..f65c3c88 100644 --- a/frontend/src/index.html +++ b/frontend/src/index.html @@ -2,7 +2,7 @@ - Webcli + fastenhealth diff --git a/go.mod b/go.mod index 1fe3179e..25d25013 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/packagrio/goweb-template +module github.com/fastenhealth/fastenhealth-onprem go 1.18