Uncharted
05/29/2021, 4:19 PMapplicationCode: fs.readFileSync(
path.join(__dirname, '.', '<myfile>.sql'),
'utf8'
)
I read there was a copyFiles available for Function but how to do it without Function ?Jay
.build
directory. So the __dirname
here is pointing to that. For now you can workaround this by using a relative path but I think we need a proper solution for this.Frank
Frank
process.cwd()
instead of `__dirname`:
path.join(process.cwd(), "path/to/<myfile>.sql")
process.cwd()
points to the root of your SST app, ie. where your sst.json
sitsFrank
Frank
Uncharted
06/17/2021, 7:40 AM