# WebDev - Run from folder

**URL:** <https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787>\
**Category:** 3rd Party Modules\
**Created:** [March 10, 2015, 1:03pm UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787 "2015-03-10T13:03:29Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![CosmicBagel](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@CosmicBagel](https://forum.inductiveautomation.com/u/CosmicBagel)\
**Post date:** [March 10, 2015, 1:03pm UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787/1 "2015-03-10T13:03:29Z")

</div>

So I’m hoping to ditch the Mobile Client module in favor of the WebDev module, currently working on a proof of concept to derive development time estimations from and to plot out a bit of a roadmap.

The big question on my mind is whether or not we’ll be able to point the WebDev module at a directory that we can just version with git, would make collaborating and feature development so much easier. Additionally I would be able to ditch the designer almost completely expect when I need to modify tags.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [March 10, 2015, 2:15pm UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787/2 "2015-03-10T14:15:46Z")

</div>

Sure. Just write your Python scripts outside the Ignition designer in your favorite text editor or IDE and then call them inside the Ignition designer. Information about how to do that is here: [perfectabstractions.com/blog … on-modules](http://www.perfectabstractions.com/blog/new-scripting-features-in-ignition-77-part-1#external-python-modules)

Use and version control a directory under C:\Program Files\Inductive Automation\Ignition\user-lib\pylib

Best,

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [March 11, 2015, 3:00am UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787/3 "2015-03-11T03:00:55Z")

</div>

hate to just jump in but the webdev module sounds interesting, but way over my head. Can you grab tag values directly from ignition and display them in a webpage? I am assuming you could also query the database. how does that work,? do you have to make the connection thru the Ignition gateway or do you setup the connection directly in python? I looked at the manual but it doesnt give any examples and Im just not sure what the use case would be for the module. If its something you could interface with tags and the database and perhaps build a more “fluid” mobile website, or even alternative html frontend as opposed to using java, that would be interesting.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [March 11, 2015, 6:32am UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787/4 "2015-03-11T06:32:49Z")

</div>

Hi diat,  
Let me answer all your questions.

> [@](#):
>
> Can you grab tag values directly from ignition and display them in a webpage?

Yes.

> [@](#):
>
> I am assuming you could also query the database. how does that work

The same way as in the rest of Ignition. Use the datasources that have been configured in the Gateway and use the system.db.\* query functions to send queries to databases. Look at the examples for any of the query functions in the Ignition User Manual. They are used no differently in WebDev Python scripts.

Accessing tags in WebDev Python scripts is also done the same way as in any other script: using the system.tag.\* functions.

Typical Ignition Python scripting, accessing tags, databases, Python user-libraries etc. is the same in WebDev Python scripts.

> [@](#):
>
> If its something you could interface with tags and the database and perhaps build a more "fluid" mobile website, or even alternative html frontend as opposed to using java, that would be interesting.

Yes, that's what the WebDev module is for. WebDev stands for Web Development.

The WebDev module is for making websites that are served from the Ignition Gateway. The data resources in Ignition such as tags and database connections are available to the Python scripts that you write to generate the webpages and web data feeds etc.

The WebDev module provides documentation for the web resources and functionality that it exposes and gives examples of how to use them.

It does not give examples of how to develop websites and webpages, JSON, Javascript etc. But it really doesn't need to because there are so many web development learning resources on the Web and in books. For example google searches can be made for tutorials on CSS, HTML, Javascript, JSON, session management, cookies, and the HTTP protocol, including HTTP headers.

> [@](#):
>
> that would be interesting.

Yes, it is! I can't wait until someone comes along and asks me to build an Ignition-based website!

Best,

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [March 11, 2015, 11:00am UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787/5 "2015-03-11T11:00:13Z")

</div>

yeah sounds really neat. Ill have to look more into it to get a better understanding. It would be awesome to have a few examples of maybe displaying some tags or a table with query results, etc… so those of us that have little knowledge could see some of it in practice and get a better understanding on how to use it in real world application. Maybe one of your next blogs could focus on making use of the webdev module.

BTW, I appreciate the time you take to write the blogs. Pretty cool of you to take time to help others.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [March 11, 2015, 3:28pm UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787/6 "2015-03-11T15:28:16Z")

</div>

Thanks diat. I think it is a great suggestion to write a blog post about the WebDev and give an example or examples. I will find some time for it.

---

<div class="post-metadata">

**Author:** ![jerroldlaw](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jerroldlaw](https://forum.inductiveautomation.com/u/jerroldlaw)\
**Post date:** [August 26, 2016, 10:14am UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787/7 "2016-08-26T10:14:10Z")

</div>

[quote=“nmudge”]Sure. Just write your Python scripts outside the Ignition designer in your favorite text editor or IDE and then call them inside the Ignition designer. Information about how to do that is here: [perfectabstractions.com/blog … on-modules](http://www.perfectabstractions.com/blog/new-scripting-features-in-ignition-77-part-1#external-python-modules)

Use and version control a directory under C:\Program Files\Inductive Automation\Ignition\user-lib\pylib

Best,[/quote]

Hi,

This would allow you to version your python scripts. But what about the html css, and js files etc. What the OP wants is to version a folder of his entire web directory without creating files in the WebDev section of his designer project. Is this possible or am I missing something here? Thank you!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 26, 2016, 11:44am UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787/8 "2016-08-26T11:44:28Z")

</div>

[quote=“jerroldlaw”]This would allow you to version your python scripts. But what about the html css, and js files etc. What the OP wants is to version a folder of his entire web directory without creating files in the WebDev section of his designer project. Is this possible or am I missing something here? Thank you![/quote]It’s possible, but you’ll have to write the linkage yourself, in python. The python scripts will be given the URLs the browser requests, which can then serve the static files however you choose.

---

<div class="post-metadata">

**Author:** ![jerroldlaw](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jerroldlaw](https://forum.inductiveautomation.com/u/jerroldlaw)\
**Post date:** [August 26, 2016, 2:57pm UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787/9 "2016-08-26T14:57:00Z")

</div>

> [@pturmel](#):
>
> [quote="jerroldlaw"]This would allow you to version your python scripts. But what about the html css, and js files etc. What the OP wants is to version a folder of his entire web directory without creating files in the WebDev section of his designer project. Is this possible or am I missing something here? Thank you![/quote]It's possible, but you'll have to write the linkage yourself, in python. The python scripts will be given the URLs the browser requests, which can then serve the static files however you choose.

Hi Phil,

Thanks for your response! I'm just starting to learn python web programming.

> [@pturmel](#):
>
> The python scripts will be given the URLs the browser requests

How do I give my external scripts the URLs? I'm guessing I will have to write a http server which translates the URL and serve the files? Or do I have to create an individual python file for every page / URL in the designer which redirects the URL to my external python scripts?

By the way, would it be a good idea or even possible to install a web framework (let's say Pyramid [pylonsproject.org/projects/pyramid/about](http://www.pylonsproject.org/projects/pyramid/about)) on the ignition server as well?

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [October 24, 2016, 9:53pm UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787/10 "2016-10-24T21:53:26Z")

</div>

So i am trying to something similar to OP, where I have developed a basic HTML app outside of Designer. I have a Project folder with all my .html, .css and .js files in it which i want to copy to the Web Dev directory.

And i don't quite understand the last couple of posts.

What is the file path to access the Web Dev files in Debian? I thought it would be something like:

> [@](#):
>
> usr/local/bin/ignition/webserver/.....

Is it even possible to copy over an entire folder, or import a folder through the Designer?

What is the "Add Mounted Folder" option in the Web Dev section of the Designer for? Thought that might be what I wanted but there isn't any documentation on it.

Thanks

---

<div class="post-metadata">

**Author:** ![jerroldlaw](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jerroldlaw](https://forum.inductiveautomation.com/u/jerroldlaw)\
**Post date:** [October 25, 2016, 8:11am UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787/11 "2016-10-25T08:11:41Z")

</div>

[quote]What is the file path to access the Web Dev files in Debian? I thought it would be something like:

> [@](#):
>
> usr/local/bin/ignition/webserver/.....[/quote]

There is no file path access to the WebDev files. The files which you create using the Ignition designer are all in the .proj file and you will not be able to access the files outside the designer.

> [@](#):
>
> What is the "Add Mounted Folder" option in the Web Dev section of the Designer for? Thought that might be what I wanted but there isn't any documentation on it.

Yes. This might just be what you want as those were my exact thoughts when I first saw it as well. Just created a mounted folder called 'project' for example, and link it to the path of your project folder in your OS (Debian for your case). You can then access your project files with the URL [example:8088/main/system/webdev/ ... me/project](http://example:8088/main/system/webdev/projectname/project).

The WebDev module is really great once you figure it out!

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [October 25, 2016, 10:37pm UTC](https://forum.inductiveautomation.com/t/webdev-run-from-folder/9787/12 "2016-10-25T22:37:06Z")

</div>

So i got the mounted folder to work but only when using Designer on the local host of the machine Ignition is installed on.

Which is awesome, because now i can export an HTML app from an app building website and get it running on my gateway in just a few minutes! Only downside is you cannot browse/edit any of the files in the Mounted Folder via Designer. But the Designer was never really very nice to edit the files in the first place i suppose.
