@ozdao/martyrs 0.2.586 → 0.2.588
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth.server.js +14 -1
- package/dist/chats.server.js +1 -1
- package/dist/community.server.js +1 -1
- package/dist/core.server.js +24 -25
- package/dist/events.server.js +1 -1
- package/dist/files.server.js +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/inventory.server.js +1 -1
- package/dist/marketplace.server.js +1 -1
- package/dist/martyrs/src/components/Select/{Select.vue.js → Select.vue2.js} +2 -2
- package/dist/martyrs/src/components/Select/Select.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Tab/{Tab.vue2.js → Tab.vue.js} +2 -2
- package/dist/martyrs/src/components/Tab/Tab.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js +10 -33
- package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
- package/dist/notifications.server.js +1 -1
- package/dist/orders.server.js +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/pages.server.js +1 -1
- package/dist/products.server.js +1 -1
- package/dist/rents.server.js +1 -1
- package/dist/reports.server.js +1 -1
- package/dist/spots.server.js +1 -1
- package/dist/style.css +2 -2
- package/dist/wallet.server.js +1 -1
- package/package.json +23 -18
- package/src/modules/auth/auth.server.js +15 -1
- package/src/modules/chats/chats.server.js +1 -1
- package/src/modules/community/community.server.js +1 -1
- package/src/modules/core/core.server.js +4 -31
- package/src/modules/core/models/log.model.js +24 -0
- package/src/modules/core/views/components/pages/404.vue +2 -3
- package/src/modules/events/events.server.js +1 -1
- package/src/modules/files/files.server.js +1 -1
- package/src/modules/gallery/gallery.server.js +1 -1
- package/src/modules/governance/governance.server.js +1 -1
- package/src/modules/icons/icons.server.js +1 -1
- package/src/modules/inventory/inventory.server.js +1 -1
- package/src/modules/marketplace/marketplace.server.js +1 -1
- package/src/modules/notifications/notifications.server.js +1 -1
- package/src/modules/orders/orders.server.js +1 -1
- package/src/modules/organizations/organizations.server.js +1 -1
- package/src/modules/pages/pages.server.js +1 -1
- package/src/modules/products/products.server.js +1 -1
- package/src/modules/rents/rents.server.js +1 -1
- package/src/modules/reports/reports.server.js +1 -1
- package/src/modules/spots/spots.server.js +1 -1
- package/src/modules/wallet/wallet.server.js +1 -1
- package/dist/martyrs/src/components/Select/Select.vue.js.map +0 -1
- package/dist/martyrs/src/components/Tab/Tab.vue2.js.map +0 -1
- package/src/cli/commands/create.js +0 -106
- package/src/cli/index.js +0 -25
- package/src/cli/templates/app/.env.development.mustache +0 -14
- package/src/cli/templates/app/.env.production.mustache +0 -14
- package/src/cli/templates/app/Dockerfile +0 -36
- package/src/cli/templates/app/babel.config.js +0 -14
- package/src/cli/templates/app/env.js +0 -3
- package/src/cli/templates/app/index.js +0 -46
- package/src/cli/templates/app/mongodb.config.js +0 -18
- package/src/cli/templates/app/package.json.mustache +0 -65
- package/src/cli/templates/app/src/client.js +0 -22
- package/src/cli/templates/app/src/components/pages/Index.vue +0 -11
- package/src/cli/templates/app/src/configs/global.config.js.mustache +0 -40
- package/src/cli/templates/app/src/localization/extensions.js +0 -2
- package/src/cli/templates/app/src/localization/index.js +0 -44
- package/src/cli/templates/app/src/localization/overrides.js +0 -2
- package/src/cli/templates/app/src/localization/translations.js +0 -10
- package/src/cli/templates/app/src/models/index.js +0 -9
- package/src/cli/templates/app/src/router/index.js +0 -48
- package/src/cli/templates/app/src/scss/theme.scss +0 -18
- package/src/cli/templates/app/src/server.js +0 -68
- package/src/cli/templates/app/src/store/index.js +0 -9
- package/src/cli/templates/docker-compose.yaml.mustache +0 -47
- package/src/cli/templates/nginx/Dockerfile +0 -5
- package/src/cli/templates/nginx/default.conf.mustache +0 -55
- package/src/cli/templates/public/favicon/.gitkeep +0 -0
- package/src/cli/templates/start-dev.sh.mustache +0 -131
- package/src/cli/templates/start-prod.sh.mustache +0 -12
|
@@ -5,7 +5,7 @@ import ModelPayment from './models/payment.model.js';
|
|
|
5
5
|
// import ModelReward from './models/reward.model.js';
|
|
6
6
|
// import ModelWallet from './models/wallet.model.js';
|
|
7
7
|
// Initialization function for setting up the module within the application
|
|
8
|
-
function initializePayments(app, db, wss, origins, publicPath) {
|
|
8
|
+
function initializePayments({ app, db, wss, origins, publicPath }) {
|
|
9
9
|
// Setup models in the database object
|
|
10
10
|
// db.wallet = ModelWallet(db);
|
|
11
11
|
db.payment = ModelPayment(db);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.vue.js","sources":["../../../../../src/components/Select/Select.vue"],"sourcesContent":["<template>\n <!-- Input Wrapper -->\n <div \n ref=\"fieldWrapper\"\n tabindex=\"0\"\n @click.stop=\"toggleMenu\" \n v-click-outside=\"clickedOutside\" \n :class=\"$attrs.class\" \n class=\"cursor-pointer field-wrapper flex-v-center flex-nowrap flex pos-relative\"\n >\n <!-- Label -->\n <span v-if=\"label\" class=\"t-transp mn-r-small\">{{label}}</span>\n \n <!-- Input -->\n <span>\n {{ optionsSelected ? (optionsSelected.name || optionsSelected[props.value] || optionsSelected) : placeholder }}\n </span>\n <!-- Dropdown menu -->\n <transition mode=\"out-in\" name=\"TransitionTranslateY\">\n <ul \n v-show=\"showMenu\" \n class=\"bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 pd-small radius-small bg-white mn-t-thin w-100\"\n style=\"min-width: max-content;\"\n >\n <li @click.stop=\"selectOption(option)\" v-for=\"option in optionsListed\" class=\"radius-thin hover:bg-light pd-thin text-box-trim\">\n <span v-if=\"option\" class=\"w-100\">\n {{ option.name || option[props.value] || option }}\n </span>\n </li>\n </ul>\n </transition>\n </div>\n <!-- Validation -->\n <transition mode=\"out-in\" name=\"fade\">\n <div v-if=\"validation\" class=\"mn-t-thin invalid-feedback\">\n * {{validation.message}}\n </div>\n </transition>\n</template>\n<script setup>\nimport { ref, computed, watch, nextTick } from 'vue'\nimport clickOutside from '../FieldPhone/click-outside.js';\nlet vClickOutside = clickOutside\nconst emit = defineEmits([\n 'update:select', \n 'focus', \n 'blur'\n])\nconst props = defineProps({\n label: String,\n placeholder: { type: String, default: 'Please select an item' },\n select: [String, Object],\n property: String,\n value: String,\n options: { type: Array, default: () => [] },\n validation: Boolean,\n})\nconst showMenu = ref(false)\nconst fieldWrapper = ref(null)\nconst optionsSelected = ref(\n props.property \n ? findObjectByValue(props.select, props.property, props.options) \n : props.select\n)\nconst optionsListed = computed(() => {\n return props.select \n ? props.options.filter(option => option !== props.select) \n : props.options\n})\nwatch(() => props.select, (newSelect) => {\n optionsSelected.value = \n props.property \n ? findObjectByValue(props.select, props.property, props.options) \n : props.select;\n});\nconst toggleMenu = async () => {\n showMenu.value = !showMenu.value\n \n if (showMenu.value) {\n await nextTick()\n fieldWrapper.value?.focus()\n emit('focus')\n } else {\n emit('blur')\n }\n}\nfunction clickedOutside () {\n showMenu.value = false\n}\nconst selectOption = option => {\n optionsSelected.value = option\n \n toggleMenu()\n if (props.property) { \n emit('update:select', optionsSelected.value[props.property])\n } else {\n emit('update:select', optionsSelected.value)\n }\n}\nfunction findObjectByValue (value, property, objects) {\n for (const object of objects) {\n if (object[property] === value || object === value) {\n return object;\n }\n }\n return null;\n}\n</script>\n<style lang=\"scss\" scoped>\n li {\n list-style-type: none;\n }\n ul li {\n line-height: 2;\n }\n .field-wrapper:focus {\n outline: none;\n }\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,QAAI,gBAAgB;AACpB,UAAM,OAAO;AAKb,UAAM,QAAQ;AASd,UAAM,WAAW,IAAI,KAAK;AAC1B,UAAM,eAAe,IAAI,IAAI;AAC7B,UAAM,kBAAkB;AAAA,MACtB,MAAM,WACJ,kBAAkB,MAAM,QAAQ,MAAM,UAAU,MAAM,OAAO,IAC7D,MAAM;AAAA,IACV;AACA,UAAM,gBAAgB,SAAS,MAAM;AACnC,aAAO,MAAM,SACX,MAAM,QAAQ,OAAO,YAAU,WAAW,MAAM,MAAM,IACtD,MAAM;AAAA,IACV,CAAC;AACD,UAAM,MAAM,MAAM,QAAQ,CAAC,cAAc;AACvC,sBAAgB,QAChB,MAAM,WACJ,kBAAkB,MAAM,QAAQ,MAAM,UAAU,MAAM,OAAO,IAC7D,MAAM;AAAA,IACV,CAAC;AACD,UAAM,aAAa,YAAY;AAC7B,eAAS,QAAQ,CAAC,SAAS;AAE3B,UAAI,SAAS,OAAO;AAClB,cAAM,SAAQ;AACd,qBAAa,OAAO,MAAK;AACzB,aAAK,OAAO;AAAA,MACd,OAAO;AACL,aAAK,MAAM;AAAA,MACb;AAAA,IACF;AACA,aAAS,iBAAkB;AACzB,eAAS,QAAQ;AAAA,IACnB;AACA,UAAM,eAAe,YAAU;AAC7B,sBAAgB,QAAQ;AAExB,iBAAU;AACV,UAAI,MAAM,UAAU;AAClB,aAAK,iBAAiB,gBAAgB,MAAM,MAAM,QAAQ,CAAC;AAAA,MAC7D,OAAO;AACL,aAAK,iBAAiB,gBAAgB,KAAK;AAAA,MAC7C;AAAA,IACF;AACA,aAAS,kBAAmB,OAAO,UAAU,SAAS;AACpD,iBAAW,UAAU,SAAS;AAC5B,YAAI,OAAO,QAAQ,MAAM,SAAS,WAAW,OAAO;AAClD,iBAAO;AAAA,QACT;AAAA,MACF;AACA,aAAO;AAAA,IACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.vue2.js","sources":["../../../../../src/components/Tab/Tab.vue"],"sourcesContent":["<template>\n <div class=\"flex-nowrap flex-v-center flex pos-relative\">\n <button \n v-for=\"(tab, index) in tabs\" \n :key=\"index\" \n @click=\"handleTabClick(index, tab)\" \n class=\"z-index-1 t-center cursor-pointer\"\n :style=\"isSelected(index, tab) ? 'background: rgb(var(--main)) !important' : ''\"\n :class=\"[\n isSelected(index, tab) ? 'bg-main' : '',\n replaceClasses('pd-small pd-r-medium pd-l-medium w-max pd-small radius-small', classTab)\n ]\"\n >\n {{tab.name || tab.label}}\n </button>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, watch } from 'vue'\nimport { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\nconst { replaceClasses } = useGlobalMixins();\nconst emit = defineEmits(['update:selected', 'tab-click']);\n\nconst props = defineProps({\n tabs: Array,\n classTab: String,\n selected: [String, Number],\n modelValue: [String, Number],\n callback: Function\n})\n\nconst selectedTab = ref(0)\n\n// Handle both v-model and selected prop for backward compatibility\nconst updateSelectedIndex = () => {\n if (props.modelValue !== undefined) {\n const selectedIndex = props.tabs.findIndex(tab => tab.value === props.modelValue)\n if (selectedIndex !== -1) {\n selectedTab.value = selectedIndex\n }\n } else if (props.selected !== undefined) {\n const selectedIndex = props.tabs.findIndex(tab => tab.value === props.selected)\n if (selectedIndex !== -1) {\n selectedTab.value = selectedIndex\n }\n }\n}\n\n// Initial setup\nupdateSelectedIndex()\n\n// Watch for changes in selected or modelValue props\nwatch(() => props.selected, updateSelectedIndex)\nwatch(() => props.modelValue, updateSelectedIndex)\n\n// Check if tab is selected\nconst isSelected = (index, tab) => {\n if (props.modelValue !== undefined) {\n return tab.value === props.modelValue\n } else if (props.selected !== undefined) {\n return tab.value === props.selected\n }\n return index === selectedTab.value\n}\n\n// Handle tab click\nfunction handleTabClick(index, tab) {\n selectedTab.value = index\n \n // Emit both events for flexibility\n emit('update:selected', tab.value)\n emit('tab-click', { index, tab })\n \n // For v-model support\n if (props.modelValue !== undefined) {\n emit('update:modelValue', tab.value)\n }\n \n // Call callback if provided\n if (props.callback) props.callback(tab)\n}\n</script>\n\n<style lang=\"scss\">\n.tab-selector {\n position: absolute;\n width: 50%;\n height: 100%;\n left: 0;\n top: 0;\n z-index: 0;\n transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAsBA,UAAM,EAAE,eAAc,IAAK,gBAAe;AAC1C,UAAM,OAAO;AAEb,UAAM,QAAQ;AAQd,UAAM,cAAc,IAAI,CAAC;AAGzB,UAAM,sBAAsB,MAAM;AAChC,UAAI,MAAM,eAAe,QAAW;AAClC,cAAM,gBAAgB,MAAM,KAAK,UAAU,SAAO,IAAI,UAAU,MAAM,UAAU;AAChF,YAAI,kBAAkB,IAAI;AACxB,sBAAY,QAAQ;AAAA,QACtB;AAAA,MACF,WAAW,MAAM,aAAa,QAAW;AACvC,cAAM,gBAAgB,MAAM,KAAK,UAAU,SAAO,IAAI,UAAU,MAAM,QAAQ;AAC9E,YAAI,kBAAkB,IAAI;AACxB,sBAAY,QAAQ;AAAA,QACtB;AAAA,MACF;AAAA,IACF;AAGA,wBAAmB;AAGnB,UAAM,MAAM,MAAM,UAAU,mBAAmB;AAC/C,UAAM,MAAM,MAAM,YAAY,mBAAmB;AAGjD,UAAM,aAAa,CAAC,OAAO,QAAQ;AACjC,UAAI,MAAM,eAAe,QAAW;AAClC,eAAO,IAAI,UAAU,MAAM;AAAA,MAC7B,WAAW,MAAM,aAAa,QAAW;AACvC,eAAO,IAAI,UAAU,MAAM;AAAA,MAC7B;AACA,aAAO,UAAU,YAAY;AAAA,IAC/B;AAGA,aAAS,eAAe,OAAO,KAAK;AAClC,kBAAY,QAAQ;AAGpB,WAAK,mBAAmB,IAAI,KAAK;AACjC,WAAK,aAAa,EAAE,OAAO,IAAG,CAAE;AAGhC,UAAI,MAAM,eAAe,QAAW;AAClC,aAAK,qBAAqB,IAAI,KAAK;AAAA,MACrC;AAGA,UAAI,MAAM,SAAU,OAAM,SAAS,GAAG;AAAA,IACxC;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { mkdir, readFile, writeFile, readdir, stat, chmod, copyFile } from 'fs/promises';
|
|
2
|
-
import { join, dirname, relative } from 'path';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
import Mustache from 'mustache';
|
|
5
|
-
import { execSync } from 'child_process';
|
|
6
|
-
|
|
7
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
-
const __dirname = dirname(__filename);
|
|
9
|
-
|
|
10
|
-
const TEMPLATES_DIR = join(__dirname, '../templates');
|
|
11
|
-
|
|
12
|
-
export async function createProject(projectName, options) {
|
|
13
|
-
const targetDir = join(process.cwd(), projectName);
|
|
14
|
-
|
|
15
|
-
console.log(`\nCreating project: ${projectName}\n`);
|
|
16
|
-
|
|
17
|
-
// Контекст для шаблонов
|
|
18
|
-
const context = {
|
|
19
|
-
projectName,
|
|
20
|
-
projectNameLower: projectName.toLowerCase().replace(/[^a-z0-9]/g, ''),
|
|
21
|
-
martyrsVersion: '^0.2.585',
|
|
22
|
-
year: new Date().getFullYear(),
|
|
23
|
-
port: '8040',
|
|
24
|
-
portNginx: '8041',
|
|
25
|
-
portWss: '8020',
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
// Копируем шаблоны
|
|
29
|
-
await copyTemplates(TEMPLATES_DIR, targetDir, context);
|
|
30
|
-
|
|
31
|
-
// Делаем скрипты исполняемыми
|
|
32
|
-
try {
|
|
33
|
-
await chmod(join(targetDir, 'start-dev.sh'), 0o755);
|
|
34
|
-
await chmod(join(targetDir, 'start-prod.sh'), 0o755);
|
|
35
|
-
} catch (e) {
|
|
36
|
-
// Игнорируем если файлов нет
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Git init
|
|
40
|
-
try {
|
|
41
|
-
execSync('git init', { cwd: targetDir, stdio: 'pipe' });
|
|
42
|
-
console.log('✓ Git repository initialized');
|
|
43
|
-
} catch (e) {
|
|
44
|
-
console.log('⚠ Git init skipped');
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// pnpm install
|
|
48
|
-
if (!options.skipInstall) {
|
|
49
|
-
console.log('\nInstalling dependencies...\n');
|
|
50
|
-
try {
|
|
51
|
-
execSync('pnpm install', { cwd: join(targetDir, 'app'), stdio: 'inherit' });
|
|
52
|
-
console.log('\n✓ Dependencies installed');
|
|
53
|
-
} catch (e) {
|
|
54
|
-
console.log('\n⚠ Install failed. Run manually: cd app && pnpm install');
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Инструкции
|
|
59
|
-
console.log(`
|
|
60
|
-
═══════════════════════════════════════════
|
|
61
|
-
Project "${projectName}" created!
|
|
62
|
-
═══════════════════════════════════════════
|
|
63
|
-
|
|
64
|
-
Next steps:
|
|
65
|
-
|
|
66
|
-
cd ${projectName}/app
|
|
67
|
-
${options.skipInstall ? 'pnpm install\n ' : ''}pnpm dev:nginx
|
|
68
|
-
|
|
69
|
-
Then open: http://localhost:${context.portNginx}
|
|
70
|
-
|
|
71
|
-
═══════════════════════════════════════════
|
|
72
|
-
`);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
async function copyTemplates(srcDir, destDir, context) {
|
|
76
|
-
await mkdir(destDir, { recursive: true });
|
|
77
|
-
|
|
78
|
-
const entries = await readdir(srcDir, { withFileTypes: true });
|
|
79
|
-
|
|
80
|
-
for (const entry of entries) {
|
|
81
|
-
const srcPath = join(srcDir, entry.name);
|
|
82
|
-
let destName = entry.name;
|
|
83
|
-
|
|
84
|
-
// Убираем .mustache из имени
|
|
85
|
-
if (destName.endsWith('.mustache')) {
|
|
86
|
-
destName = destName.replace('.mustache', '');
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const destPath = join(destDir, destName);
|
|
90
|
-
|
|
91
|
-
if (entry.isDirectory()) {
|
|
92
|
-
await copyTemplates(srcPath, destPath, context);
|
|
93
|
-
} else {
|
|
94
|
-
const content = await readFile(srcPath, 'utf8');
|
|
95
|
-
|
|
96
|
-
// Обрабатываем .mustache файлы
|
|
97
|
-
let output = content;
|
|
98
|
-
if (entry.name.endsWith('.mustache')) {
|
|
99
|
-
output = Mustache.render(content, context);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
await mkdir(dirname(destPath), { recursive: true });
|
|
103
|
-
await writeFile(destPath, output);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
package/src/cli/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { program } from 'commander';
|
|
4
|
-
import { createProject } from './commands/create.js';
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
import { dirname, join } from 'path';
|
|
7
|
-
import { readFileSync } from 'fs';
|
|
8
|
-
|
|
9
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
-
const __dirname = dirname(__filename);
|
|
11
|
-
|
|
12
|
-
const pkg = JSON.parse(readFileSync(join(__dirname, '../../package.json'), 'utf8'));
|
|
13
|
-
|
|
14
|
-
program
|
|
15
|
-
.name('martyrs')
|
|
16
|
-
.description('CLI for @ozdao/martyrs framework')
|
|
17
|
-
.version(pkg.version);
|
|
18
|
-
|
|
19
|
-
program
|
|
20
|
-
.command('create <project-name>')
|
|
21
|
-
.description('Create a new martyrs project')
|
|
22
|
-
.option('--skip-install', 'Skip pnpm install after creation')
|
|
23
|
-
.action(createProject);
|
|
24
|
-
|
|
25
|
-
program.parse();
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
NODE_ENV=development
|
|
2
|
-
PORT={{port}}
|
|
3
|
-
PORT_WSS={{portWss}}
|
|
4
|
-
SSL=false
|
|
5
|
-
APP_NAME={{projectName}}
|
|
6
|
-
|
|
7
|
-
DOMAIN_URL=localhost
|
|
8
|
-
API_URL=http://localhost:{{port}}
|
|
9
|
-
WSS_URL=ws://localhost:{{portNginx}}/api/ws
|
|
10
|
-
|
|
11
|
-
DB_ADDRESS='mongodb://localhost:27017/{{projectNameLower}}?authSource=admin'
|
|
12
|
-
SECRET_KEY=change-me-in-production
|
|
13
|
-
|
|
14
|
-
GOOGLE_TAG_ID=
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
NODE_ENV=production
|
|
2
|
-
PORT=8080
|
|
3
|
-
PORT_WSS=8020
|
|
4
|
-
SSL=false
|
|
5
|
-
APP_NAME={{projectName}}
|
|
6
|
-
|
|
7
|
-
DOMAIN_URL=example.com
|
|
8
|
-
API_URL=https://example.com
|
|
9
|
-
WSS_URL=wss://example.com/api/ws
|
|
10
|
-
|
|
11
|
-
DB_ADDRESS='mongodb://user:password@localhost:27017/{{projectNameLower}}?authSource=admin'
|
|
12
|
-
SECRET_KEY=change-me-in-production
|
|
13
|
-
|
|
14
|
-
GOOGLE_TAG_ID=
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
FROM node:22.14.0-alpine
|
|
2
|
-
|
|
3
|
-
WORKDIR /app
|
|
4
|
-
|
|
5
|
-
RUN apk update && apk upgrade && apk add --no-cache \
|
|
6
|
-
build-base \
|
|
7
|
-
git \
|
|
8
|
-
make \
|
|
9
|
-
gcc \
|
|
10
|
-
g++ \
|
|
11
|
-
libc6-compat \
|
|
12
|
-
vips-dev \
|
|
13
|
-
python3 \
|
|
14
|
-
py3-setuptools \
|
|
15
|
-
linux-headers \
|
|
16
|
-
libuv-dev \
|
|
17
|
-
openssl-dev \
|
|
18
|
-
zlib-dev
|
|
19
|
-
|
|
20
|
-
COPY app/package*.json ./
|
|
21
|
-
COPY public/sw.js public/sw.js
|
|
22
|
-
|
|
23
|
-
RUN corepack enable
|
|
24
|
-
RUN corepack prepare pnpm@latest --activate
|
|
25
|
-
|
|
26
|
-
RUN pnpm install
|
|
27
|
-
|
|
28
|
-
COPY app/ .
|
|
29
|
-
|
|
30
|
-
ENV TZ=Europe/Moscow
|
|
31
|
-
|
|
32
|
-
EXPOSE 8080
|
|
33
|
-
|
|
34
|
-
RUN pnpm run build
|
|
35
|
-
|
|
36
|
-
CMD ["pnpm", "run", "start"]
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import './env.js';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
import { rspack } from '@rspack/core';
|
|
5
|
-
|
|
6
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
-
const projectRoot = path.dirname(__filename);
|
|
8
|
-
|
|
9
|
-
const command = process.argv[2];
|
|
10
|
-
const MODE = process.env.MODE || 'SSR';
|
|
11
|
-
const isDev = process.env.NODE_ENV !== 'production';
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
createSsrRspackDevServer,
|
|
15
|
-
createSsrProdServer,
|
|
16
|
-
createSpaRspackDevServer,
|
|
17
|
-
createSpaProdServer,
|
|
18
|
-
rspackConfigs
|
|
19
|
-
} from '@ozdao/martyrs/builder';
|
|
20
|
-
import createServer from './src/server.js';
|
|
21
|
-
|
|
22
|
-
const configs = {
|
|
23
|
-
api: rspackConfigs.apiConfig(projectRoot),
|
|
24
|
-
spa: rspackConfigs.spaConfig(projectRoot),
|
|
25
|
-
client: rspackConfigs.clientConfig(projectRoot),
|
|
26
|
-
ssr: rspackConfigs.ssrConfig(projectRoot)
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
if (command === 'build') {
|
|
30
|
-
const toBuild = MODE === 'SSR' ? [configs.client, configs.ssr] : [configs.spa];
|
|
31
|
-
|
|
32
|
-
for (const config of toBuild) {
|
|
33
|
-
const compiler = rspack(config);
|
|
34
|
-
await new Promise(resolve => compiler.run(() => compiler.close(resolve)));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
console.log('Build done');
|
|
38
|
-
process.exit(0);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const serverFunc = MODE === 'SSR'
|
|
42
|
-
? (isDev ? createSsrRspackDevServer : createSsrProdServer)
|
|
43
|
-
: (isDev ? createSpaRspackDevServer : createSpaProdServer);
|
|
44
|
-
|
|
45
|
-
const start = serverFunc(projectRoot, configs, createServer);
|
|
46
|
-
start();
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
let adressDB = process.env.DB_ADDRESS;
|
|
2
|
-
|
|
3
|
-
import db from "./src/models/index.js";
|
|
4
|
-
|
|
5
|
-
db.mongoose
|
|
6
|
-
.connect(adressDB, {
|
|
7
|
-
connectTimeoutMS: 20000,
|
|
8
|
-
socketTimeoutMS: 50000,
|
|
9
|
-
})
|
|
10
|
-
.then(() => {
|
|
11
|
-
console.log("Successfully connect to MongoDB.");
|
|
12
|
-
})
|
|
13
|
-
.catch(err => {
|
|
14
|
-
console.error("Connection error", err);
|
|
15
|
-
process.exit();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export default db;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{projectName}}",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"description": "Project created with @ozdao/martyrs",
|
|
5
|
-
"author": "",
|
|
6
|
-
"license": "ISC",
|
|
7
|
-
"private": true,
|
|
8
|
-
"type": "module",
|
|
9
|
-
"main": "./index.js",
|
|
10
|
-
"scripts": {
|
|
11
|
-
"preinstall": "npx only-allow pnpm",
|
|
12
|
-
"dev": "NODE_ENV=development node --loader esm-module-alias/loader index.js",
|
|
13
|
-
"dev:spa": "NODE_ENV=development MODE=SPA node --loader esm-module-alias/loader index.js",
|
|
14
|
-
"dev:nginx": "../start-dev.sh",
|
|
15
|
-
"build": "NODE_ENV=production node --loader esm-module-alias/loader index.js build",
|
|
16
|
-
"build:spa": "NODE_ENV=production MODE=SPA node --loader esm-module-alias/loader index.js build",
|
|
17
|
-
"start": "NODE_ENV=production node --loader esm-module-alias/loader index.js",
|
|
18
|
-
"start:nginx": "../start-prod.sh"
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"@ozdao/martyrs": "{{martyrsVersion}}",
|
|
22
|
-
"@rspack/cli": "1.5.3",
|
|
23
|
-
"@unhead/ssr": "1.9.16",
|
|
24
|
-
"@unhead/vue": "1.9.16",
|
|
25
|
-
"@vue/compiler-sfc": "3.4.38",
|
|
26
|
-
"@vue/server-renderer": "3.5.13",
|
|
27
|
-
"axios": "1.7.4",
|
|
28
|
-
"cookie-parser": "1.4.6",
|
|
29
|
-
"cors": "2.8.5",
|
|
30
|
-
"express": "4.19.2",
|
|
31
|
-
"js-cookie": "3.0.5",
|
|
32
|
-
"mongodb": "6.8.0",
|
|
33
|
-
"mongoose": "8.5.3",
|
|
34
|
-
"mustache": "4.2.0",
|
|
35
|
-
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.56.0",
|
|
36
|
-
"vue": "3.5.13",
|
|
37
|
-
"vue-i18n": "9.14.0",
|
|
38
|
-
"vue-router": "4.4.3",
|
|
39
|
-
"webpack-dev-middleware": "7.3.0"
|
|
40
|
-
},
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"@babel/core": "7.25.2",
|
|
43
|
-
"@babel/plugin-transform-runtime": "7.24.7",
|
|
44
|
-
"@babel/preset-env": "7.25.3",
|
|
45
|
-
"@babel/preset-flow": "7.24.7",
|
|
46
|
-
"@babel/runtime": "7.27.0",
|
|
47
|
-
"@rspack/core": "1.5.3",
|
|
48
|
-
"babel-loader": "9.1.3",
|
|
49
|
-
"body-parser": "1.20.2",
|
|
50
|
-
"core-js": "3.38.0",
|
|
51
|
-
"css-loader": "7.1.2",
|
|
52
|
-
"dotenv": "16.4.5",
|
|
53
|
-
"esm-module-alias": "2.2.1",
|
|
54
|
-
"only-allow": "1.2.1",
|
|
55
|
-
"sass": "1.77.8",
|
|
56
|
-
"sass-loader": "16.0.0",
|
|
57
|
-
"vue-loader": "17.4.2"
|
|
58
|
-
},
|
|
59
|
-
"aliases": {
|
|
60
|
-
"@": "./src"
|
|
61
|
-
},
|
|
62
|
-
"_moduleAliases": {
|
|
63
|
-
"@": "./src"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import 'martyrs-jit.css';
|
|
2
|
-
import '@/scss/theme.scss';
|
|
3
|
-
|
|
4
|
-
import { createUniversalApp } from '@ozdao/martyrs/modules/core/client';
|
|
5
|
-
|
|
6
|
-
import { getConfig } from '@/configs/global.config.js';
|
|
7
|
-
import { getRouter } from '@/router/index.js';
|
|
8
|
-
import { getStore } from '@/store/index.js';
|
|
9
|
-
import { getLocales } from '@/localization/index.js';
|
|
10
|
-
|
|
11
|
-
const appPromise = createUniversalApp({
|
|
12
|
-
getConfig,
|
|
13
|
-
getRouter,
|
|
14
|
-
getLocales,
|
|
15
|
-
getStore,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export async function _renderApp({ url, cookies, languages, ssrContext }) {
|
|
19
|
-
const { renderApp } = await appPromise;
|
|
20
|
-
|
|
21
|
-
return renderApp({ url, cookies, languages, ssrContext });
|
|
22
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="wrapper pd-medium">
|
|
3
|
-
<div class="flex flex-column gap-medium align-center justify-center h-100vh">
|
|
4
|
-
<h1 class="t-center">{{ $t('welcome') }}</h1>
|
|
5
|
-
<p class="t-dark-semi t-center">Your martyrs project is ready!</p>
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script setup>
|
|
11
|
-
</script>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export async function getConfig() {
|
|
2
|
-
return {
|
|
3
|
-
env: {
|
|
4
|
-
isMobileApp: process.env.MOBILE_APP || false,
|
|
5
|
-
},
|
|
6
|
-
|
|
7
|
-
core: {
|
|
8
|
-
websocket: true,
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
app: {
|
|
12
|
-
support: {
|
|
13
|
-
url: 'https://t.me/support'
|
|
14
|
-
},
|
|
15
|
-
messages: {
|
|
16
|
-
en: {
|
|
17
|
-
meta: {
|
|
18
|
-
title: '{{projectName}}',
|
|
19
|
-
description: 'Project built with @ozdao/martyrs',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
ru: {
|
|
23
|
-
meta: {
|
|
24
|
-
title: '{{projectName}}',
|
|
25
|
-
description: 'Проект на @ozdao/martyrs',
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
modules: {
|
|
32
|
-
auth: {
|
|
33
|
-
loader: () => import('@ozdao/martyrs/modules/auth/client'),
|
|
34
|
-
routes: ['/'],
|
|
35
|
-
priority: 'high',
|
|
36
|
-
dependencies: []
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { createI18n } from 'vue-i18n';
|
|
2
|
-
import { i18nManager } from '@ozdao/martyrs/modules/core/client';
|
|
3
|
-
|
|
4
|
-
import translations from './translations.js';
|
|
5
|
-
import overrides from './overrides.js';
|
|
6
|
-
import extensions from './extensions.js';
|
|
7
|
-
|
|
8
|
-
const supportedLocales = {
|
|
9
|
-
en: "🇬🇧 EN",
|
|
10
|
-
ru: "🇷🇺 RU"
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export function getLocales() {
|
|
14
|
-
if (translations) {
|
|
15
|
-
Object.entries(translations).forEach(([module, locales]) => {
|
|
16
|
-
i18nManager.register(module, locales);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (extensions) {
|
|
21
|
-
Object.entries(extensions).forEach(([module, locales]) => {
|
|
22
|
-
i18nManager.extend(module, locales);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (overrides) {
|
|
27
|
-
Object.entries(overrides).forEach(([module, locales]) => {
|
|
28
|
-
i18nManager.override(module, locales);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const messages = i18nManager.getAllMessages();
|
|
33
|
-
|
|
34
|
-
const i18n = createI18n({
|
|
35
|
-
legacy: false,
|
|
36
|
-
locale: 'en',
|
|
37
|
-
fallbackLocale: 'en',
|
|
38
|
-
messages,
|
|
39
|
-
globalInjection: true,
|
|
40
|
-
availableLocales: Object.keys(supportedLocales),
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
return i18n;
|
|
44
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createRouter,
|
|
3
|
-
createMemoryHistory,
|
|
4
|
-
createWebHistory,
|
|
5
|
-
} from 'vue-router';
|
|
6
|
-
|
|
7
|
-
import { scrollBehavior, layoutClient, Header, Sidebar, Navigation, NavigationBar } from '@ozdao/martyrs/modules/core/client';
|
|
8
|
-
|
|
9
|
-
const isServer = typeof window === 'undefined';
|
|
10
|
-
|
|
11
|
-
let history = isServer ? createMemoryHistory() : createWebHistory();
|
|
12
|
-
|
|
13
|
-
const routes = [{
|
|
14
|
-
path: '/:locale?',
|
|
15
|
-
|
|
16
|
-
components: {
|
|
17
|
-
default: layoutClient
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
name: 'Home',
|
|
21
|
-
|
|
22
|
-
meta: {
|
|
23
|
-
header: Header,
|
|
24
|
-
sidebar: Sidebar,
|
|
25
|
-
sidebar_navigation: Navigation,
|
|
26
|
-
navigationbar: NavigationBar,
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
children: [{
|
|
30
|
-
path: '',
|
|
31
|
-
name: "Index",
|
|
32
|
-
meta: {
|
|
33
|
-
title: {
|
|
34
|
-
en: 'Home',
|
|
35
|
-
ru: 'Главная'
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
component: () => import('@/components/pages/Index.vue'),
|
|
39
|
-
}]
|
|
40
|
-
}];
|
|
41
|
-
|
|
42
|
-
export function getRouter() {
|
|
43
|
-
return createRouter({
|
|
44
|
-
routes,
|
|
45
|
-
history,
|
|
46
|
-
scrollBehavior
|
|
47
|
-
});
|
|
48
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
@import '/node_modules/@ozdao/martyrs/dist/style.css';
|
|
2
|
-
@import '/node_modules/@ozdao/martyrs/src/styles/theme.scss';
|
|
3
|
-
|
|
4
|
-
:root {
|
|
5
|
-
color-scheme: light dark;
|
|
6
|
-
|
|
7
|
-
--main: 59, 130, 246;
|
|
8
|
-
--second: 139, 92, 246;
|
|
9
|
-
--third: 34, 197, 94;
|
|
10
|
-
|
|
11
|
-
--black: 0, 0, 0;
|
|
12
|
-
--dark: 64, 64, 64;
|
|
13
|
-
--grey: 156, 163, 175;
|
|
14
|
-
--light: 243, 244, 246;
|
|
15
|
-
--white: 255, 255, 255;
|
|
16
|
-
|
|
17
|
-
--font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
18
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import express from 'express';
|
|
3
|
-
import cors from 'cors';
|
|
4
|
-
import cookies from 'cookie-parser';
|
|
5
|
-
import http from 'http';
|
|
6
|
-
import dotenv from 'dotenv';
|
|
7
|
-
import { fileURLToPath } from 'url';
|
|
8
|
-
|
|
9
|
-
import core from '@ozdao/martyrs/modules/core/server';
|
|
10
|
-
import auth from '@ozdao/martyrs/modules/auth/server';
|
|
11
|
-
import db from '../mongodb.config.js';
|
|
12
|
-
|
|
13
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
-
const __dirname = path.dirname(__filename);
|
|
15
|
-
|
|
16
|
-
dotenv.config({ path: `.env.${process.env.NODE_ENV}` });
|
|
17
|
-
|
|
18
|
-
const port = process.env.PORT || 8080;
|
|
19
|
-
const publicPath = path.join(__dirname, '../../public');
|
|
20
|
-
|
|
21
|
-
const createServer = async () => {
|
|
22
|
-
const app = express();
|
|
23
|
-
|
|
24
|
-
const allowedOrigins = [
|
|
25
|
-
process.env.API_URL,
|
|
26
|
-
'http://localhost',
|
|
27
|
-
'http://localhost:8080',
|
|
28
|
-
'http://localhost:8040',
|
|
29
|
-
'http://localhost:8041',
|
|
30
|
-
'http://localhost:3000',
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
app.use(cors({
|
|
34
|
-
credentials: true,
|
|
35
|
-
origin: (origin, callback) => {
|
|
36
|
-
if (allowedOrigins.includes(origin) || !origin) {
|
|
37
|
-
callback(null, true);
|
|
38
|
-
} else {
|
|
39
|
-
callback(new Error('Origin not allowed by CORS'));
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
}));
|
|
43
|
-
|
|
44
|
-
app.set("trust proxy", 1);
|
|
45
|
-
app.use(express.json());
|
|
46
|
-
app.use(express.urlencoded({ extended: true }));
|
|
47
|
-
app.use(cookies());
|
|
48
|
-
app.use(express.static(path.resolve(__dirname, "../../public")));
|
|
49
|
-
|
|
50
|
-
const server = http.createServer(app);
|
|
51
|
-
|
|
52
|
-
const wss = await core.WebSocketManager();
|
|
53
|
-
|
|
54
|
-
wss.listen(process.env.PORT_WSS || 8020, () => {
|
|
55
|
-
console.log(`WebSocket server listening on port ${process.env.PORT_WSS || 8020}`);
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
core.initialize(app, db, allowedOrigins, publicPath);
|
|
59
|
-
auth.initialize(app, db, allowedOrigins, publicPath);
|
|
60
|
-
|
|
61
|
-
return { app, server };
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export { createServer };
|
|
65
|
-
|
|
66
|
-
export default {
|
|
67
|
-
createServer
|
|
68
|
-
};
|