Skip to content

Commit a090974

Browse files
author
yaroslav8765
committed
Revert "fix: update environment variables import in index.ts.hbs"
This reverts commit 9f42b87.
1 parent 9f42b87 commit a090974

File tree

9 files changed

+17
-316
lines changed

9 files changed

+17
-316
lines changed

dev-demo/.env.sample

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
AWS_ACCESS_KEY_ID=
22
AWS_SECRET_ACCESS_KEY=
3+
ADMINFORTH_SECRET=123
4+
NODE_ENV=development
35
OPENAI_API_KEY=1
46
HEAVY_DEBUG=
57
HEAVY_DEBUG_QUERY=
8+
PORT=3000
9+
10+
DATABASE_FILE=./db.sqlite
11+
DATABASE_FILE_URL=file:${DATABASE_FILE}

dev-demo/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
node_modules
22
*.sqlite
3-
*.sqlite-journal
43
.env
54
db

dev-demo/custom/GroupTable.vue

Lines changed: 0 additions & 96 deletions
This file was deleted.

dev-demo/index.ts

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import usersResource from './resources/users.js';
1111
// import gameResource from './resources/game.js';
1212
// import gamesUsersResource from './resources/games_users.js';
1313
// import gamesResource from './resources/games.js';
14-
// import groupTableResource from './resources/';
1514
import translationsResource from './resources/translation.js';
1615
import clinicsResource from './resources/clinics.js';
1716
import providersResource from './resources/providers.js';
@@ -79,16 +78,7 @@ export const admin = new AdminForth({
7978
loginBackgroundImage: 'https://images.unsplash.com/photo-1534239697798-120952b76f2b?q=80&w=3389&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
8079
loginBackgroundPosition: '1/2', // over, 3/4, 2/5, 3/5 (tailwind grid)
8180
demoCredentials: "adminforth:adminforth", // never use it for production
82-
loginPromptHTML: async () => { return "Nya"},
83-
// loginPromptHTML:"Nya without function",
84-
// async () =>{
85-
// const adminForthUserExists = await admin.resource('users').count() > 0;
86-
// if (adminForthUserExists) {
87-
// return `<p>Welcome to <b>AdminForth</b> demo!</p>`
88-
// } else {
89-
// return `<p>Welcome to <b>AdminForth</b> demo!</p>`
90-
// }
91-
// },
81+
loginPromptHTML: "Use email <b>adminforth</b> and password <b>adminforth</b> to login",
9282
// loginBackgroundImage: '@@/pho.jpg',
9383
rememberMeDays: 30,
9484
beforeLoginConfirmation: [async ({adminUser, adminforth, extra}) => {
@@ -200,7 +190,7 @@ export const admin = new AdminForth({
200190
dataSources: [
201191
{
202192
id: 'maindb',
203-
url: process.env.DATABASE_URL as string,
193+
url: process.env.DATABASE_URL,
204194
},
205195
{
206196
id: 'pg',
@@ -212,7 +202,7 @@ export const admin = new AdminForth({
212202
},
213203
{
214204
id: 'ch',
215-
url: 'clickhouse://demo:demo@localhost:8124/demo',
205+
url: 'clickhouse://demo:demo@localhost:8125/demo',
216206
},
217207
{
218208
id: 'mysql',
@@ -235,17 +225,10 @@ export const admin = new AdminForth({
235225
translationsResource,
236226
],
237227
menu: [
238-
{
239-
label: 'TablesGroup',
240-
path: '/overview',
241-
homepage: true,
242-
icon: 'flowbite:chart-pie-solid',
243-
component: '@@/GroupTable.vue',
244-
},
245228
{
246229
label: 'Dashboard',
247230
icon: 'flowbite:chart-pie-solid',
248-
component: '@@/GroupTable.vue',
231+
component: '@@/Dash.vue',
249232
path: '/dashboard',
250233
// homepage: true,
251234
isStaticRoute:false,
@@ -353,7 +336,7 @@ export const admin = new AdminForth({
353336

354337
const app = express()
355338
app.use(express.json());
356-
const port = process.env.PORT || 3001;
339+
const port = process.env.PORT || 3000;
357340

358341
(async () => {
359342
console.log('🅿️ Bundling AdminForth...');

0 commit comments

Comments
 (0)