Difference between revisions of "Webstorm deploy"

From mn/ifi/inf5750
Jump to: navigation, search
Line 1: Line 1:
<div>You can set up webstorm to deploy your local project files using SFTP (SSH) to the group server. This is a simple way to update your server so that you can test the files. Other IDEs support similar deployment functions, but Webstorm only is covered here.&nbsp;</div><div><br/></div><div>First install an app using the standard web dhis interface. You files will be available in a folder like this:</div><div><br/></div><div>/usr/share/tomcat/webapps/ROOT/apps/app-name</div><div><br/></div><div>which will be the following address on your server:</div><div><br/></div><div>[http://servername/apps/app-name http://servername/apps/app-name]</div><div><br/></div><div>Go to Tools->Deployment->Configuration in the menu.&nbsp;</div><div><br/></div><div>A window will appear, and click + to add a new service.<br/></div><div>[[File:Webstorm configuration upload 1.png]]<br/></div><div>&nbsp;</div><div><br/></div><div>Then enter your server name, '/' as the root path and your UIO username and password (the same as you use to SSH into the server).&nbsp;</div><div><br/></div><div>The under mappings, add a mapping directory.&nbsp;</div><div><br/></div><div>The local path should be on your local hard-disk, where your project is.&nbsp;</div><div><br/></div><div>For me this is: C:\Users\roland\WebstormProjects\Example\app</div><div><br/></div><div>The deployment path is the path on the server where Webstorm will put your files. It should look something like this:</div><div><br/></div><div>/usr/share/tomcat/webapps/ROOT/apps/app-name</div><div><br/></div><div>but instead of app-name, use your app-name&nbsp;</div><div><br/></div><div>TIP: Set up separate app names for each group member, so you can use the same server but have parallell apps.&nbsp;</div><div><br/></div><div>The web path would be something like this: /apps/app-name</div><div><br/></div><div>Under 'Excluded paths', you need to exclude your manifest file, since you don't want to overwrite the server's version of this.&nbsp;</div><div><br/></div><div>My excluded path says this: C:/Users/roland/WebstormProjects/Example/app/manifest.webapp</div><div><br/></div><div>[[File:Webstorm configuration upload 3.png]]<br/></div><div><br/></div><div>You can experiment with 'automatic upload' to upload files automatically as you save them.</div><div><br/></div><div>Remember that you have to refresh your browser to get the new files. They are cached in your browser.&nbsp;</div><div><br/></div>
+
<div>You can set up webstorm to deploy your local project files using SFTP (SSH) to the group server. This is a simple way to update your server so that you can test the files. Other IDEs support similar deployment functions, but Webstorm only is covered here.&nbsp;</div><div><br/></div><div>First install an app using the standard web dhis interface. You files will be available in a folder like this:</div><div><br/></div><div>/usr/share/tomcat/webapps/ROOT/apps/app-name</div><div><br/></div><div>which will be the following address on your server:</div><div><br/></div><div>[http://servername/apps/app-name http://servername/apps/app-name]</div><div><br/></div><div>Go to Tools->Deployment->Configuration in the menu.&nbsp;</div><div><br/></div><div>A window will appear, and click + to add a new service.<br/></div><div>[[File:Webstorm configuration upload 1.png]]<br/></div><div>&nbsp;</div><div><br/></div><div>Then enter your server name, '/' as the root path and your UIO username and password (the same as you use to SSH into the server).&nbsp;</div><div><br/></div><div>The under mappings, add a mapping directory.&nbsp;</div><div><br/></div><div>The local path should be on your local hard-disk, where your project is.&nbsp;</div><div><br/></div><div>For me this is: C:\Users\roland\WebstormProjects\Example\app</div><div><br/></div><div>The deployment path is the path on the server where Webstorm will put your files. It should look something like this:</div><div><br/></div><div>/usr/share/tomcat/webapps/ROOT/apps/app-name</div><div><br/></div><div>but instead of app-name, use your app-name&nbsp;</div><div><br/></div><div><span style="font-size: 12px;">TIP: Set up separate app names for each group member, so you can use the same server but have parallell apps.&nbsp;</span></div><div><br/></div><div>The web path would be something like this: /apps/app-name</div><div><br/></div><div><br/></div><div>[[File:Webstorm configuration upload 2.png]]<br/></div><div><br/></div><div><br/></div><div>Under 'Excluded paths', you need to exclude your manifest file, since you don't want to overwrite the server's version of this.&nbsp;</div><div><br/></div><div>My excluded path says this: C:/Users/roland/WebstormProjects/Example/app/manifest.webapp</div><div><br/></div><div>[[File:Webstorm configuration upload 3.png]]<br/></div><div><br/></div><div>You can experiment with 'automatic upload' to upload files automatically as you save them.</div><div><br/></div><div>Remember that you have to refresh your browser to get the new files. They are cached in your browser.&nbsp;</div><div><br/></div>

Revision as of 14:40, 12 November 2014

You can set up webstorm to deploy your local project files using SFTP (SSH) to the group server. This is a simple way to update your server so that you can test the files. Other IDEs support similar deployment functions, but Webstorm only is covered here. 

First install an app using the standard web dhis interface. You files will be available in a folder like this:

/usr/share/tomcat/webapps/ROOT/apps/app-name

which will be the following address on your server:

http://servername/apps/app-name

Go to Tools->Deployment->Configuration in the menu. 

A window will appear, and click + to add a new service.
Webstorm configuration upload 1.png
 

Then enter your server name, '/' as the root path and your UIO username and password (the same as you use to SSH into the server). 

The under mappings, add a mapping directory. 

The local path should be on your local hard-disk, where your project is. 

For me this is: C:\Users\roland\WebstormProjects\Example\app

The deployment path is the path on the server where Webstorm will put your files. It should look something like this:

/usr/share/tomcat/webapps/ROOT/apps/app-name

but instead of app-name, use your app-name 

TIP: Set up separate app names for each group member, so you can use the same server but have parallell apps. 

The web path would be something like this: /apps/app-name


Webstorm configuration upload 2.png


Under 'Excluded paths', you need to exclude your manifest file, since you don't want to overwrite the server's version of this. 

My excluded path says this: C:/Users/roland/WebstormProjects/Example/app/manifest.webapp

Webstorm configuration upload 3.png

You can experiment with 'automatic upload' to upload files automatically as you save them.

Remember that you have to refresh your browser to get the new files. They are cached in your browser.