This took a few more changes than other servers have. It was hard to work out how to deal with the strongly-typed config as source code thing.
To deal with that I've done the following:
config.ts is checked in, but imports a JSON file (as source code!)
the file serverconfig.json contains the actual config.
this exports the JSON content as strongly typed configuration file
I have checked in a file without config values
The deployment process takes a Github secret which contains the real values and exports it as a replacement JSON file in the correct location before the build process begins.
I don't love this - it's too easy to check in the wrong config. Not sure of a better way though, and I do like the strongly typed config.
Deployed to https://dataconnector.tn.verida.tech/
When this PR is approved then merges to
main
should update the deployment. This is (as yet) untested, but will test once this is merged.https://dataconnector.tn.verida.tech/connect/twitter says it needs config changed on the Twitter side. https://dataconnector.tn.verida.tech/connect/facebook gives an error but I don't have any useful logging yet.
This took a few more changes than other servers have. It was hard to work out how to deal with the strongly-typed config as source code thing.
To deal with that I've done the following:
config.ts
is checked in, but imports a JSON file (as source code!)serverconfig.json
contains the actual config.I don't love this - it's too easy to check in the wrong config. Not sure of a better way though, and I do like the strongly typed config.