Node server settings

I was curious, is there a way to edit the default node web.js configs? I know i can do it after the fact but I was curious if I could do it as part of the template, basically I need to increase the default upload size to a larger number, while I can do it after the build it would be nice to just edit the template it used or what not to actually add the string to that.

Thanks!

The best way to do this is to set up a postbuild hook to automatically replace the config file after doing a build.

Hooks can be written in python, nodejs or shell script.

For instance:

cd <app directory>
mkdir -p hooks/postbuild

Then edit a new file: hooks/postbuild/myhook.sh

#!/usr/bin/env bash
cp /path/to/custom/web.js web/web.js

Finally, give your hook file execute permissions:

chmod 0755 hooks/postbuild/myhook.sh

You can check the docs out here: https://trigger.io/docs/current/tools/hooks.html