Skip to content

Commit a176d3e

Browse files
author
한혜원
committed
accepting default app.yaml file
1 parent d2f3f60 commit a176d3e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

index.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default function entrypoint(options = {}) {
1515
useCloudTracing = false,
1616
dependencies = {},
1717
nodejsRuntime = 18,
18+
defaultYamlFile = 'app.yaml'
1819
} = options;
1920

2021
return {
@@ -134,15 +135,15 @@ export default function entrypoint(options = {}) {
134135
url: `/${file}`,
135136
// eslint-disable-next-line camelcase
136137
static_files: join("storage", file).replaceAll("\\", "/"),
137-
upload: join("storage", file).replaceAll("\\", "/"),
138-
secure: "always",
139-
}));
138+
upload: join("storage", file).replaceAll("\\", "/"),
139+
secure: "always",
140+
}));
140141

141142
// Load existing app.yaml if it exists
142143
let yaml = {};
143-
if (existsSync("app.yaml")) {
144-
builder.log.minor("Existing app.yaml found");
145-
yaml = YAML.parse(readFileSync("app.yaml").toString());
144+
if (existsSync(defaultYamlFile)) {
145+
builder.log.minor(`Existing ${defaultYamlFile} found`);
146+
yaml = YAML.parse(readFileSync(defaultYamlFile).toString());
146147
}
147148

148149
const serverRoutes = [

0 commit comments

Comments
 (0)