diff --git a/README.md b/README.md index e69de29..96b65aa 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,3 @@ +# swaf boilerplate + +Boilerplate for a quickstart with [swaf](https://eternae.ink/arisu/swaf) diff --git a/app.service b/app.service index 32f2b99..ece8fd0 100644 --- a/app.service +++ b/app.service @@ -1,13 +1,16 @@ +# Please customize values i.e. paths, user, group, WorkingDirectory based on your environment. Do not use the same +# user and group for different applications. + [Unit] -Description=WMS website +Description=swaf based website After=network-online.target Wants=network-online.target [Service] Type=simple -User=wms -Group=wms -WorkingDirectory=/home/wms/live +User=swaf +Group=swaf +WorkingDirectory=/home/swaf/live Restart=on-success Environment=NODE_ENV=production ExecStart=/bin/node . diff --git a/assets/img/logo.svg b/assets/img/logo.svg index c33da66..4f8fb6e 100644 --- a/assets/img/logo.svg +++ b/assets/img/logo.svg @@ -19,7 +19,6 @@ id="svg6" sodipodi:docname="logo.svg" inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)" - inkscape:export-filename="/r/arisu/dev/streams/wms/assets/img/logox1024.png" inkscape:export-xdpi="4096" inkscape:export-ydpi="4096"> ('input, textarea').forEach(el => { diff --git a/config/test.json5 b/config/test.json5 index c184427..cda9d47 100644 --- a/config/test.json5 +++ b/config/test.json5 @@ -3,7 +3,7 @@ host: "localhost", user: "root", password: "", - database: "wms2_test", + database: "swaf_test", create_database_automatically: true } } diff --git a/package.json b/package.json index 501e8f2..1550885 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "example-app", "version": "0.1.0", - "description": "Example App based on wms-core", - "repository": "https://gitlab.com/ArisuOngaku/wms-boilerplate", + "description": "Example App based on swaf", + "repository": "https://eternae.ink/arisu/swaf-boilerplate", "author": "Alice Gaudon ", "private": true, "main": "dist/src/main.js", @@ -60,6 +60,6 @@ "dependencies": { "config": "^3.3.1", "express": "^4.17.1", - "wms-core": "^0.22.0" + "swaf": "^0.22.5" } } diff --git a/src/App.ts b/src/App.ts index 6633f86..f645a64 100644 --- a/src/App.ts +++ b/src/App.ts @@ -1,24 +1,24 @@ -import Application from "wms-core/Application"; -import Migration, {MigrationType} from "wms-core/db/Migration"; -import CreateMigrationsTable from "wms-core/migrations/CreateMigrationsTable"; -import ExpressAppComponent from "wms-core/components/ExpressAppComponent"; -import NunjucksComponent from "wms-core/components/NunjucksComponent"; -import MysqlComponent from "wms-core/components/MysqlComponent"; -import LogRequestsComponent from "wms-core/components/LogRequestsComponent"; -import RedisComponent from "wms-core/components/RedisComponent"; -import ServeStaticDirectoryComponent from "wms-core/components/ServeStaticDirectoryComponent"; -import MaintenanceComponent from "wms-core/components/MaintenanceComponent"; -import MailComponent from "wms-core/components/MailComponent"; -import SessionComponent from "wms-core/components/SessionComponent"; -import RedirectBackComponent from "wms-core/components/RedirectBackComponent"; -import FormHelperComponent from "wms-core/components/FormHelperComponent"; -import CsrfProtectionComponent from "wms-core/components/CsrfProtectionComponent"; -import WebSocketServerComponent from "wms-core/components/WebSocketServerComponent"; +import Application from "swaf/Application"; +import Migration, {MigrationType} from "swaf/db/Migration"; +import CreateMigrationsTable from "swaf/migrations/CreateMigrationsTable"; +import ExpressAppComponent from "swaf/components/ExpressAppComponent"; +import NunjucksComponent from "swaf/components/NunjucksComponent"; +import MysqlComponent from "swaf/components/MysqlComponent"; +import LogRequestsComponent from "swaf/components/LogRequestsComponent"; +import RedisComponent from "swaf/components/RedisComponent"; +import ServeStaticDirectoryComponent from "swaf/components/ServeStaticDirectoryComponent"; +import MaintenanceComponent from "swaf/components/MaintenanceComponent"; +import MailComponent from "swaf/components/MailComponent"; +import SessionComponent from "swaf/components/SessionComponent"; +import RedirectBackComponent from "swaf/components/RedirectBackComponent"; +import FormHelperComponent from "swaf/components/FormHelperComponent"; +import CsrfProtectionComponent from "swaf/components/CsrfProtectionComponent"; +import WebSocketServerComponent from "swaf/components/WebSocketServerComponent"; import HomeController from "./controllers/HomeController"; -import AutoUpdateComponent from "wms-core/components/AutoUpdateComponent"; +import AutoUpdateComponent from "swaf/components/AutoUpdateComponent"; import packageJson = require('../package.json'); -import DummyMigration from "wms-core/migrations/DummyMigration"; -import DropLegacyLogsTable from "wms-core/migrations/DropLegacyLogsTable"; +import DummyMigration from "swaf/migrations/DummyMigration"; +import DropLegacyLogsTable from "swaf/migrations/DropLegacyLogsTable"; export default class App extends Application { public constructor( diff --git a/src/controllers/HomeController.ts b/src/controllers/HomeController.ts index e6e3fb3..d8a0379 100644 --- a/src/controllers/HomeController.ts +++ b/src/controllers/HomeController.ts @@ -1,4 +1,4 @@ -import Controller from "wms-core/Controller"; +import Controller from "swaf/Controller"; import {Request, Response} from "express"; export default class HomeController extends Controller { @@ -17,7 +17,7 @@ export default class HomeController extends Controller { } /** - * This is to test and assert that wms-core extended types are available + * This is to test and assert that swaf extended types are available */ protected async goBack(req: Request, res: Response): Promise { res.redirectBack(); diff --git a/src/main.ts b/src/main.ts index 14be157..0033726 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,12 +1,12 @@ import {delimiter} from "path"; -// Load config from specified path or default + wms-core/config (default defaults) +// Load config from specified path or default + swaf/config (default defaults) process.env['NODE_CONFIG_DIR'] = - __dirname + '/../../node_modules/wms-core/config/' + __dirname + '/../../node_modules/swaf/config/' + delimiter + (process.env['NODE_CONFIG_DIR'] || __dirname + '/../../config/'); -import {log} from "wms-core/Logger"; +import {log} from "swaf/Logger"; import App from "./App"; import config from "config"; diff --git a/tsconfig.json b/tsconfig.json index 5ea85f7..9034d02 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,6 +16,6 @@ }, "include": [ "src/**/*", - "node_modules/wms-core/types" + "node_modules/swaf/types" ] } diff --git a/views/about.njk b/views/about.njk index dbb6047..f1e7a0a 100644 --- a/views/about.njk +++ b/views/about.njk @@ -8,7 +8,7 @@

This is us

-

And we like wms!

+

And we like swaf!

-{% endblock %} \ No newline at end of file +{% endblock %}