Theia IDE is an open-source extensible framework for building web-based cloud IDEs, with proper multi-language support and VS Code extensions. Tencent Cloud Lighthouse provides the Theia IDE image with Go, Python, Node.js, Clang, and OpenJDK development environments installed, allowing you to easily and quickly develop projects and businesses across platforms.
NoteWe recommend you use Chrome or Firefox for this operation, as other browsers (such as Safari) may have compatibility issues.
/
from the drop-down list to open the directory. In Theia IDE, a directory is a workspace. /data
is used as an example in this document./data
workspace.NoteTheia IDE supports Python, Java, Go, C/C++, and Node.js languages. Sample programs in Python, Go, and C++ are run on the command line and in the GUI here.
Python
and a simple sample file main.py
under it.cd Python
python3.8 main.pyThe execution result is as shown below:
go
and a simple sample file main.go
under it.cd go
go run main.goThe execution result is as shown below:
main.go
file and select c++
and a simple sample file main.cpp
under it.cd c++
clang++ main.c
./a.outThe execution result is as shown below:
/${command:askProgramPath}
in the configuration file with /c++/a.out
and save the change.You can install an SSL certificate and enable HTTPS access for your Theia IDE instance as instructed in Installing Certificate on NGINX Server.
See the following configuration to modify the file:NoteYou only need to modify the
/usr/local/lighthouse/softwares/nginx/conf/include/theia.conf
configuration file but not/usr/local/lighthouse/softwares/nginx/conf/nginx.conf
for your Theia IDE instance.
server {
listen 443 ssl;
server_tokens off;
keepalive_timeout 5;
root /usr/local/lighthouse/softwares/nginx/html;
index index.php index.html;
access_log logs/theia.log combinediox;
error_log logs/theia.error.log;
server_name cloud.tencent.com; # Enter the domain name bound to your certificate, such as `cloud.tencent.com`
ssl_certificate 1_cloud.tencent.com_bundle.crt; # Enter the name of your certificate file, such as `1_cloud.tencent.com_bundle.crt`
ssl_certificate_key 2_cloud.tencent.com.key; # Enter the name of your private key file, such as `2_cloud.tencent.com.key`
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # You can see this SSL protocol for configuration
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; # You can use this encryption suite configuration written in line with the OpenSSL standard
ssl_prefer_server_ciphers on;
auth_digest_user_file /home/lighthouse/passwd.digest;
auth_digest_shm_size 8m; # the storage space allocated for tracking active sessions
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
<span class="hljs-attribute">auth_digest</span> <span class="hljs-string">'lighthouse'</span>;
<span class="hljs-attribute">auth_digest_timeout</span> <span class="hljs-number">120s</span>; <span class="hljs-comment"># allow users to wait 2 minute between receiving the</span>
<span class="hljs-comment"># challenge and hitting send in the browser dialog box</span>
<span class="hljs-attribute">auth_digest_expires</span> <span class="hljs-number">600s</span>; <span class="hljs-comment"># after a successful challenge/response, let the client</span>
<span class="hljs-comment"># continue to use the same nonce for additional requests</span>
<span class="hljs-comment"># for 600 seconds before generating a new challenge</span>
<span class="hljs-attribute">auth_digest_replays</span> <span class="hljs-number">60</span>; <span class="hljs-comment"># also generate a new challenge if the client uses the</span>
<span class="hljs-comment"># same nonce more than 60 times before the expire time limit</span>
<span class="hljs-attribute">proxy_pass</span> http://127.0.0.1:3000;
}
}
server {
listen 80;
server_name cloud.tencent.com; # Enter the domain name bound to your certificate, such as cloud.tencent.com
return 301 https://$host$request_uri; # Redirect HTTP requests to HTTPS
}
Was this page helpful?