You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While discussing this issue, I noticed that the provider startup code is included in the test file.
// Setup provider server to verify
const app = express();
app.use(apiRoutes);
const server = app.listen('8080');
The example would be clearer if we pulled it out to a file that exports a start() function or similar, highlighting that the server is the application, rather than a separate bit of code that only lives at test time.
While we're there:
The port number in that method signature is a number, not a string (although I don't think it matters)
We could also modernise the JS at the same time (es6 imports, maybe typescript, not doing Object.assign, etc).
The text was updated successfully, but these errors were encountered:
Thanks, yes that was something that should've been done a while back. I did actually do it in one of the replicants of this project, but can't see where. It's not hard, just needs to be fed back into all steps though.
An update to support newer languages makes sense also.
The example would be clearer if we pulled it out to a file that exports a start() function or similar, highlighting that the server is the application, rather than a separate bit of code that only lives at test time.
110% agree with this, I didn't get to tackle it on this round of the workshop updates (wanted to get every step at least resynchronised but this is on my radar)
Thank you for illustrating a really valid point that we want to starting and testing the code we would run in production, and not just some test time representation of the provider (which itself could drift!)
While discussing this issue, I noticed that the provider startup code is included in the test file.
The example would be clearer if we pulled it out to a file that exports a
start()
function or similar, highlighting that the server is the application, rather than a separate bit of code that only lives at test time.While we're there:
The text was updated successfully, but these errors were encountered: