A collection of scripts to automate repetitive tasks, such as setting up a fully containerized TypeScript-based Express server with minimal effort.
- Initializes a new express server with typescript configured in a docker container
- The system need not have node.js installed as everything is done inside a container
- Spins up a temporary container to initialize basic project and install dependencies
- Also creates dockerfile and docker-compose.yml file for later part
Usage
- Run the initializer script:
./express_initializer.sh <project-name>
project_name
: should be replaced by the appropriate name for your project
- Run Docker Compose
docker compose up
- This will automatically build the image if image not found
- Edit the code files locally and changes will be reflected
About Docker Container
-
Exposed Ports:
3000
-
Environment Variables:
PORT=3000
NODE_ENV=development
-
Workdir:
/usr/src/app