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
- // Initialize Payload
13
- payload.init({
14
- secret: process.env.PAYLOAD_SECRET,
15
- mongoURL: process.env.MONGODB_URI,
16
- express: app,
17
- onInit: () => {
18
- payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
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
- // Initialize Payload
13
- payload.init({
14
- secret: process.env.PAYLOAD_SECRET,
15
- mongoURL: process.env.MONGODB_URI,
16
- express: app,
17
- onInit: () => {
18
- payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
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
- // Initialize Payload
13
- payload.init({
14
- secret: process.env.PAYLOAD_SECRET,
15
- mongoURL: process.env.MONGODB_URI,
16
- express: app,
17
- onInit: () => {
18
- payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
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();
package/package.json CHANGED
@@ -36,7 +36,7 @@
36
36
  "prompts": "^2.4.0",
37
37
  "terminal-link": "^2.1.1"
38
38
  },
39
- "version": "0.3.21-beta.0",
39
+ "version": "0.3.22",
40
40
  "devDependencies": {
41
41
  "@types/command-exists": "^1.2.0",
42
42
  "@types/degit": "^2.8.3",