forked from keystonejs/keystone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeystone.ts
44 lines (40 loc) · 983 Bytes
/
keystone.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { config } from '@keystone-6/core';
import dotenv from 'dotenv';
import { fixPrismaPath } from '../example-utils';
import { lists } from './schema';
dotenv.config();
const {
S3_BUCKET_NAME: bucketName = 'keystone-test',
S3_REGION: region = 'ap-southeast-2',
S3_ACCESS_KEY_ID: accessKeyId = 'keystone',
S3_SECRET_ACCESS_KEY: secretAccessKey = 'keystone',
} = process.env;
export default config({
db: {
provider: 'sqlite',
url: process.env.DATABASE_URL || 'file:./keystone-example.db',
// WARNING: this is only needed for our monorepo examples, dont do this
...fixPrismaPath,
},
lists,
storage: {
my_images: {
kind: 's3',
type: 'image',
bucketName,
region,
accessKeyId,
secretAccessKey,
signed: { expiry: 5000 },
},
my_files: {
kind: 's3',
type: 'file',
bucketName,
region,
accessKeyId,
secretAccessKey,
signed: { expiry: 5000 },
},
},
});