Difference between revisions of "Running Titan Script on localhost"

From TITAN Wiki
Jump to: navigation, search
m
m
(Tag: visualeditor)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:DownloadVS1.png|thumb|Download VS]]
+
[[File:Titanlocalhost.png|thumb|450px|Titan Script running on localhost]]
[[File:DownloadVS2.png|thumb|Install VS: step 1]]
+
'''Running Titan Script on localhost''' - running your Titan Script locally on your computer.  
[[File:VSOpenWebsite.png|thumb|Open Website: step 1]]
 
[[File:VSOpenWebsite2.png|thumb|Open Website: step 2]]
 
[[File:VSSolutionExplorer.png|thumb|View: Solution Explorer]]
 
[[File:VSConnectionString.png|thumb|Web.config connectionString]]
 
[[File:UseTitanConnectionString.png|thumb|UseTitan connectionString]]
 
  
 +
It gives you the opportunity to modify script files and see the changes immediately. It is extremely useful when you make script/template customizations. You can easily make all changes in your script files and test them at the same time. If everything works fine, you can upload the files to your server, so the changes are effective.
  
== Download Titan Script files via FTP ==
+
When running your Titan Script on localhost, you are connected to your server (not local) SQL databases. Therefore all database changes you make on localhost, will be instantly applied to your official website.
 +
 
 +
==  Tutorial ==
 +
=== Download Titan Script files via FTP ===
 
[[How to use FTP Client?|Connect to your server via FTP]], go to the [[root directory]] and download all files.
 
[[How to use FTP Client?|Connect to your server via FTP]], go to the [[root directory]] and download all files.
== Download and install Visual Studio Community 2015 ==
+
=== Download and install Visual Studio Community 2015 ===
Go to https://www.visualstudio.com/products/free-developer-offers-vs, download Visual Studio Community and follow the installation wizzard. Once installed, run Visual Studio. A welcome page will prompt you to Sign in. Press ''Not now, maybe later'' to continue.
+
Go to https://www.visualstudio.com/products/free-developer-offers-vs, download Visual Studio Community and follow the installation wizzard. Once installed, run Visual Studio. A welcome page will prompt you to Sign in. Press "Not now, maybe later''"'' to continue.
 +
<gallery>
 +
DownloadVS1.png|Download VS
 +
DownloadVS2.png|Install VS: step 1
 +
</gallery>
 +
=== Run Titan locally ===
 +
Open Visual Studio, go to ''File → Open → Web Site...'' and select the folder with files downloaded in the previous step. Press ''Ctrl + F5''. After a few seconds/minutes, your website should open in a browser.
 +
<gallery>
 +
VSOpenWebsite.png|Open Website: step 1
 +
VSOpenWebsite2.png|Open Website: step 2
 +
VSSolutionExplorer.png|View: Solution Explorer
 +
</gallery>
 +
==== Enable detailed error messages (optional) ====
 +
You can [[Detailed error messages|enable detailed error messages]] on your locally hosted Titan Script. It will make your troubleshooting process easier.
  
== Run Titan locally ==
+
== Troubleshooting ==
Open Visual Studio, go to ''File → Open → Web Site...'' and select the folder with files downloaded in the previous step. Press ''ctrl + F5''. After a few seconds/minutes, your website should open in a browser.
 
  
== Troubleshooting ==
 
 
If you followed previous steps correctly, the only reason for an error would be a wrong connection string. In Visual Studio, go to  ''View → Solution Explorer''. Open Web.config in the [[root directory]] and search for the tag that starts with:  
 
If you followed previous steps correctly, the only reason for an error would be a wrong connection string. In Visual Studio, go to  ''View → Solution Explorer''. Open Web.config in the [[root directory]] and search for the tag that starts with:  
 
   <add name="ClientDbString"
 
   <add name="ClientDbString"
If the connectionString attribute points to a localDB, log into your account on  https://usetitan.com, go to ''Dashboard → Your Domains'' and copy your connection string from the CS column. Return to Web.config, replace connection string, press ''ctrl + s'' to save and ''ctrl + F5'' to run Titan Script again.
+
If the connectionString attribute points to a localDB/localhost, log into your account on  https://usetitan.com, go to ''Dashboard → Your Domains'' and copy your connection string from the CS column. Return to Web.config, replace connection string, press ''Ctrl + s'' to save and ''Ctrl + F5'' to run Titan Script again.
 +
<gallery>
 +
VSConnectionString.png|Web.config connectionString
 +
UseTitanConnectionString.png|UseTitan connectionString
 +
</gallery>

Latest revision as of 17:17, 13 June 2016

Titan Script running on localhost

Running Titan Script on localhost - running your Titan Script locally on your computer.

It gives you the opportunity to modify script files and see the changes immediately. It is extremely useful when you make script/template customizations. You can easily make all changes in your script files and test them at the same time. If everything works fine, you can upload the files to your server, so the changes are effective.

When running your Titan Script on localhost, you are connected to your server (not local) SQL databases. Therefore all database changes you make on localhost, will be instantly applied to your official website.

Tutorial

Download Titan Script files via FTP

Connect to your server via FTP, go to the root directory and download all files.

Download and install Visual Studio Community 2015

Go to https://www.visualstudio.com/products/free-developer-offers-vs, download Visual Studio Community and follow the installation wizzard. Once installed, run Visual Studio. A welcome page will prompt you to Sign in. Press "Not now, maybe later" to continue.

Run Titan locally

Open Visual Studio, go to File → Open → Web Site... and select the folder with files downloaded in the previous step. Press Ctrl + F5. After a few seconds/minutes, your website should open in a browser.

Enable detailed error messages (optional)

You can enable detailed error messages on your locally hosted Titan Script. It will make your troubleshooting process easier.

Troubleshooting

If you followed previous steps correctly, the only reason for an error would be a wrong connection string. In Visual Studio, go to View → Solution Explorer. Open Web.config in the root directory and search for the tag that starts with:

 <add name="ClientDbString"

If the connectionString attribute points to a localDB/localhost, log into your account on https://usetitan.com, go to Dashboard → Your Domains and copy your connection string from the CS column. Return to Web.config, replace connection string, press Ctrl + s to save and Ctrl + F5 to run Titan Script again.