Docker: Development platform

This documentation is part of the Node.js guide. You can view the complete 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) platform, designed for fast and reliable container deployments:

  • Deploy to production with a single docker-compose up command. No additional configuration required: just launch your containers.
  • Choose your own domain name, automatically secured with HTTPS (for example: https://api.your-company.com, https://www.your-company.com, or https://backoffice.your-company.com).
  • Take advantage of high performance and enhanced security on private, dedicated infrastructure.
  • Apply updates with a single click for simple, effortless maintenance.

Your containers can be running in production in about five minutes. Stackhero manages the infrastructure, updates, and security for you, so you can focus on developing your applications. Learn 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!

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.