Repository navigation
Expand file tree
/
Copy pathconfig.jsoc
More file actions
78 lines (75 loc) · 2.19 KB
/
Copy pathconfig.jsoc
File metadata and controls
78 lines (75 loc) · 2.19 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Config for the build and the app.
//
// Import it anywhere. Values are constant folded at build time, so changing
// one rebuilds the files that read it.
//
// import config from "#config";
// let name = config.database.name;
//
// env("NAME", fallback) reads a variable from the active environment's file:
// config/env/development.env, config/env/production.env, and so on.
//
// Keys are server only. A /** @browser */ tag on a property puts that
// property, and everything under it, in the browser bundle.
//
// /** @browser */
// public: { appName: "Acme" },
{
package: {
dependencies: {
"@elements/app": "^0",
"@elements/ui": "^0",
"@types/node": "latest",
"stripe": "^22.6.2",
"tslib": "latest",
},
},
resolve: {
imports: {
"#config": "./config.jsoc",
"#app/*": "./app/*",
},
},
server: {
port: env<number>("PORT", 4000),
address: env("ADDRESS", "127.0.0.1"),
},
database: {
name: "greenline",
host: env("DB_HOST", "127.0.0.1"),
port: env("DB_PORT", 5433),
user: env("DB_USER", "postgres"),
password: env("DB_PASSWORD", ""),
default: env("DB_DEFAULT", ""),
},
email: {
live: env<boolean>("EMAIL_LIVE", false),
from: "Greenline Lawn Care <hello@greenline.test>",
host: env("SMTP_HOST"),
port: env<number>("SMTP_PORT", 587),
user: env("SMTP_USER"),
password: env("SMTP_PASSWORD"),
startTls: true,
},
session: {
expires: "30d",
},
/** @browser */
public: {
businessName: "Greenline Lawn Care",
// Business hours and every displayed time are in the business's zone,
// whatever zone the viewer's device is in.
timeZone: "America/Chicago",
openHour: 9,
closeHour: 17,
},
// Card payments go through Stripe Checkout. Until a key is set, development
// pays invoices on the in-app test checkout instead.
stripe: {
// Required: a build without it fails. Development sets it empty.
secretKey: env!("STRIPE_SECRET_KEY"),
// Development only, printed by `stripe listen`. Production registers its
// own endpoint and stores the secret (see app/shared/stripe-webhook.ts).
webhookSecret: env("STRIPE_WEBHOOK_SECRET", ""),
},
}