create-payload-app 0.3.21-beta.0 → 0.3.22
Sign up to get free protection for your applications and to get access to all the features.
@@ -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();
|