create-payload-app 0.3.21 → 0.3.22
Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,12 @@
|
|
12
12
|
"skipLibCheck": true,
|
13
13
|
"outDir": "./dist",
|
14
14
|
"rootDir": "./src",
|
15
|
-
"jsx": "react"
|
15
|
+
"jsx": "react",
|
16
|
+
"paths": {
|
17
|
+
"payload/generated-types": [
|
18
|
+
"./src/payload-types.ts",
|
19
|
+
],
|
20
|
+
}
|
16
21
|
},
|
17
22
|
"include": [
|
18
23
|
"src"
|
@@ -23,6 +28,7 @@
|
|
23
28
|
"build",
|
24
29
|
],
|
25
30
|
"ts-node": {
|
26
|
-
"transpileOnly": true
|
31
|
+
"transpileOnly": true,
|
32
|
+
"swc": true,
|
27
33
|
}
|
28
34
|
}
|
@@ -9,16 +9,20 @@ app.get('/', (_, res) => {
|
|
9
9
|
res.redirect('/admin');
|
10
10
|
});
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}
|
12
|
+
const start = async () => {
|
13
|
+
// Initialize Payload
|
14
|
+
await payload.init({
|
15
|
+
secret: process.env.PAYLOAD_SECRET,
|
16
|
+
mongoURL: process.env.MONGODB_URI,
|
17
|
+
express: app,
|
18
|
+
onInit: async () => {
|
19
|
+
payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
|
20
|
+
},
|
21
|
+
})
|
21
22
|
|
22
|
-
// Add your own express routes here
|
23
|
+
// Add your own express routes here
|
23
24
|
|
24
|
-
app.listen(3000);
|
25
|
+
app.listen(3000);
|
26
|
+
}
|
27
|
+
|
28
|
+
start();
|
@@ -9,16 +9,20 @@ app.get('/', (_, res) => {
|
|
9
9
|
res.redirect('/admin');
|
10
10
|
});
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}
|
12
|
+
const start = async () => {
|
13
|
+
// Initialize Payload
|
14
|
+
await payload.init({
|
15
|
+
secret: process.env.PAYLOAD_SECRET,
|
16
|
+
mongoURL: process.env.MONGODB_URI,
|
17
|
+
express: app,
|
18
|
+
onInit: async () => {
|
19
|
+
payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
|
20
|
+
},
|
21
|
+
})
|
21
22
|
|
22
|
-
// Add your own express routes here
|
23
|
+
// Add your own express routes here
|
23
24
|
|
24
|
-
app.listen(3000);
|
25
|
+
app.listen(3000);
|
26
|
+
}
|
27
|
+
|
28
|
+
start();
|
@@ -9,16 +9,20 @@ app.get('/', (_, res) => {
|
|
9
9
|
res.redirect('/admin');
|
10
10
|
});
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}
|
12
|
+
const start = async () => {
|
13
|
+
// Initialize Payload
|
14
|
+
await payload.init({
|
15
|
+
secret: process.env.PAYLOAD_SECRET,
|
16
|
+
mongoURL: process.env.MONGODB_URI,
|
17
|
+
express: app,
|
18
|
+
onInit: async () => {
|
19
|
+
payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
|
20
|
+
},
|
21
|
+
})
|
21
22
|
|
22
|
-
// Add your own express routes here
|
23
|
+
// Add your own express routes here
|
23
24
|
|
24
|
-
app.listen(3000);
|
25
|
+
app.listen(3000);
|
26
|
+
}
|
27
|
+
|
28
|
+
start();
|