Day 38: CodeHost
Today, I updated the lambda function which triggers the build in an ECS to fetch all the environment variables added by the user to the project from the database and added it to runTaskParams object which is passed to RunTaskCommand from @aws-sdk/client-ecs.
These environment variables added to the object will be available in the container environment, which can then be accessed by Node.js during the build process.
Also updated deleteProject function in the client which on delete of a project with env’s causing an error, as there is a relation added between each env added with the project table using projectId. Updated the transaction in the server to also delete all the env’s associated with the projected on delete which solved this error.
Get Alwin Sunil’s stories in your inbox
Join Medium for free to get updates from this writer.
Now, users can add environment variables during project creation, and these variables will be accessible during the build process.
I’ve also added an Environment Variables section in the project settings. To accommodate this, I changed the layout to a tab layout with two tabs: General and Environment Variables. In the Environment Variables section, there is now an input to add new environment variables, and underneath this, options to edit or remove previous variables. For the time being, only the UI is implemented. The functionality to edit, remove, and add more environment variables will be implemented in the coming days.
That’s all for today. Thanks for your time.





