CodeSnack IDE now allows users to expose their applications to the internet using dedicated ports in their Cloud Container. You can bind your applications or Docker containers to these ports and access them securely over HTTPS.
Each Cloud Container comes with one default and five dedicated ports that can be used to expose your applications:
Your applications will be accessible via the following URL format:
https://<your_id>-<port>.cs-ide.io
For example, if your your_id is abc123
and you bind your application to port 8000, you can access it at: https://abcd1234-8000.cs-ide.io
With CodeSnack Cloud Container, you have the flexibility to use these ports in various ways. Whether you want to launch a simple web server, deploy a full-fledged web application, or run services inside Docker, you can do it effortlessly.
Here are some examples of how you can utilize the available ports:
Bind Your Application to a Port
Start your web server or application and ensure it listens on one of the available ports. Example for a simple Python server:
python3 -m http.server 8000
Run a Docker Container on a Specific Port
If you’re using Docker inside your CloudContainer, bind a container to a port:
To access your applications, you need to know your ID. Follow these steps to find it:
Open a Project
Open the Built-in Browser
Check the URL
By default, all applications exposed through CodeSnack IDE Cloud Container are accessible over HTTPS. However, if your application does not support HTTPS or requires direct HTTP access, you can disable the automatic HTTPS redirect.
To disable the HTTPS redirect, simply modify your URL by adding -http
after the port number in the subdomain: http://<your_id>-<port>-http.cs-ide.io
If your ID is abc123
and your application runs on port 8000, your HTTP URL would be: http://abc123-8000-http.cs-ide.io
⚠️ Note: HTTP traffic is not encrypted, so use it only if necessary.