create-payload-app 0.3.21 → 0.3.23
Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@
|
|
12
12
|
"serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js NODE_ENV=production node dist/server.js",
|
13
13
|
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}\" dist/",
|
14
14
|
"generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types",
|
15
|
-
"generate:graphQLSchema": "PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema"
|
15
|
+
"generate:graphQLSchema": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema"
|
16
16
|
},
|
17
17
|
"dependencies": {
|
18
18
|
"payload": "1.1.17",
|
@@ -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();
|