From 9d50c5cc5fe527430279d578560cd7b44471f113 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Thu, 12 Nov 2020 16:11:16 +0100 Subject: [PATCH] Rename project to swaf --- README.md | 34 +++++++++++++++++++++++++++++++++- config/default.json5 | 4 ++-- config/test.json5 | 2 +- package.json | 6 +++--- src/main.ts | 4 ++-- views/magic_link.njk | 4 ++-- 6 files changed, 43 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 08fe6f8..0b08eb4 100644 --- a/README.md +++ b/README.md @@ -1 +1,33 @@ -# WMS-Core \ No newline at end of file +# Structure Web Application Framework + +A NodeJS TypeScript web application framework (duh). + +## /!\ Still in development! There are not near enough tests /!\ + +Use at your own risk. Also please feel free to contribute with issues, bug reports and pull requests. + +## Features + +### Application building + +- Model, View, Controller +- Uses express +- Custom Middleware classes that enable advanced modularity +- Modular models (you can add components with some definition automation) +- Simple database migrations (raw sql queries for now) +- Nunjucks for the view template engine +- Mail template system using Nunjucks + MJML +- Beautiful logging thanks to `tslog` + +### Databases + +- MySQL (persistent data) +- Redis (cache, session) +- (more to come) + +### Common systems + +- Advanced modular multi-factor authentication system +- CSRF protection +- WebSocket server with Controller-style endpoint listeners +- WIP: automatic updates diff --git a/config/default.json5 b/config/default.json5 index e72330e..bffbcb9 100644 --- a/config/default.json5 +++ b/config/default.json5 @@ -18,13 +18,13 @@ host: "localhost", user: "root", password: "", - database: "wms2", + database: "swaf", create_database_automatically: false }, redis: { host: "127.0.0.1", port: 6379, - prefix: 'wms' + prefix: 'swaf' }, session: { secret: 'default', diff --git a/config/test.json5 b/config/test.json5 index 9062923..cda9d47 100644 --- a/config/test.json5 +++ b/config/test.json5 @@ -3,7 +3,7 @@ host: "localhost", user: "root", password: "", - database: "wms2_core_test", + database: "swaf_test", create_database_automatically: true } } diff --git a/package.json b/package.json index a97c67b..5f7650b 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "wms-core", + "name": "swaf", "version": "0.22.5", - "description": "Node web application framework and toolbelt.", - "repository": "https://gitlab.com/ArisuOngaku/wms-core", + "description": "Structure Web Application Framework.", + "repository": "https://eternae.ink/arisu/swaf", "author": "Alice Gaudon ", "license": "MIT", "readme": "README.md", diff --git a/src/main.ts b/src/main.ts index b4eecdb..0f1d6cd 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,8 +1,8 @@ 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/'); diff --git a/views/magic_link.njk b/views/magic_link.njk index 41e6e17..50c7cf9 100644 --- a/views/magic_link.njk +++ b/views/magic_link.njk @@ -2,7 +2,7 @@ {% import 'macros.njk' as macros %} {% set actionType = magicLink.action_type %} -{% set title = 'WMS: Magic Link' + (' - ' + actionType if actionType) %} +{% set title = app.name + 'Magic Link' + (' - ' + actionType if actionType) %} {% set h1 = 'Magic Link' + (' - ' + actionType if actionType) %} {% block body %} @@ -16,4 +16,4 @@ {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %}