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 offers a ready-to-use Docker cloud CaaS (Containers as a Service) solution that provides a host of benefits, including:
- Easily deploy your containers to production with just a
docker-compose up.- Customizable domain name secured with HTTPS (for example, https://api.your-company.com, https://www.your-company.com, https://backoffice.your-company.com).
- Optimal performance and robust security powered by a private and dedicated VM.
- Effortless updates with just a click.
Save time and simplify your life: it only takes 5 minutes to try Stackhero's Docker CaaS cloud hosting solution and deploy your containers to production!
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.