Docker: Development platform
This documentation is part of the Node.js guide. View the full guide here: How to use and deploy a Node.js app with Docker.
Welcome to the Stackhero documentation
Stackhero provides a ready-to-use Docker cloud CaaS (Containers as a Service) platform, designed for fast and reliable container deployments:
- Deploy to production with a single
docker-compose up. There is no extra setup: just start your containers.- Pick your own domain name, secured automatically with HTTPS (for example: https://api.your-company.com, https://www.your-company.com, or https://backoffice.your-company.com).
- Benefit from strong performance and robust security on private, dedicated infrastructure.
- Apply updates with one click for simple, low-effort maintenance.
You can have your containers live in production in about five minutes. Stackhero manages the infrastructure, updates, and security for you, so you can focus on delivering your applications. Read more about Docker CaaS cloud hosting.
To start the development platform, run:
make development-start
This command builds the Docker image, runs it, and executes the dev script defined in my-app/package.json (which is equivalent to running npm run dev).
In this example, a simple REST API using Express is created. You can view the API by navigating to http://localhost:5000. The page should display "Hello World".
Next, open the file my-app/src/app.js in your preferred IDE and modify the following line:
res.send('Hello World');
Change it to:
res.send('Updated!');
Save the file. The Node.js code will automatically reload and a refresh of http://localhost:5000 will reflect the updated API response.
Congratulations - you now have a fully operational development platform!
Install packages
If you need to install additional packages, you can run make development-shell to access the container shell. Once inside, use NPM with npm install <package> or Yarn with yarn add <package> to install your desired packages.