Can't run my app on my webserver

Just starting out? Need help? Post your questions and find answers here.
TheDarkZim
Posts: 5
Joined: Mon Apr 14, 2014 6:45 pm

Can't run my app on my webserver

Post by TheDarkZim »

Hi,

I can't get my app to run on my local appache2 server. The apache2 seems to run fine, I can open different pages on it, that I didn't create with spiderbasic.

Locally I can open my app without problems. When I use the apache server my browser says the following:

<script type="text/javascript">dojoConfig.baseUrl = 'spiderbasic/'; </script>
Paused on exception
ReferenceError: dojoConfig is not defined

why is that?

The index.html file:

Code: Select all

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="user-scalable=no, width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1"><script type="text/javascript">var spider = {}; spider.nbModules = 1; spider.nbLoadedModules = 0;</script>

<title>WebChat_example</title>

<script type="text/javascript">function onLoad() { spiderCheckBrowser(); }</script>
<script type="text/javascript" src="spiderbasic/platform.js"></script>
<script type="text/javascript" src="spiderbasic/init.js"></script>
<script type="text/javascript">dojoConfig.baseUrl = 'spiderbasic/'; </script>
<script type="text/javascript" src="spiderbasic/dojo/dojo.js"></script>
<script type="text/javascript" src="spiderbasic/main.js"></script>
<script type="text/javascript" src="spiderbasic/debug.js"></script>
<link rel="stylesheet" href="spiderbasic/dojo/themes/flat/flat.css" />
<link rel="stylesheet" href="spiderbasic/dojo/dgrid/css/dgrid.css" />
<script type="text/javascript" src="spiderbasic/xdate.min.js"></script>
<link rel="stylesheet" title="Default" href="spiderbasic/themes/flat/window.css" type="text/css"/>
<script type="text/javascript" src="webchat.js"></script>

</head>

<body oncontextmenu="return false;" class="flat" id="spiderbody" onload="onLoad()">

</body>
</html>
Cofiguration:
App name: WebChat_example
HTML filename: index.html
JavaScript filename: webchat.js
SpiderBasic libraries path: libs
Copy SpiderBasic libraries: Yes
Enable debugger: Yes

The rest is not set.

I copied the two files and the folder(libs) with the js files to my apache server.

SpiderBasic 2.21 (Linux - x64) Demo
Linux Mint 18.1 x64

Do you need any more informations?

Regards Zim
User avatar
Paul
Posts: 195
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: Can't run my app on my webserver

Post by Paul »

If you use "Compiler/Create App" from the MenuBar you can have it copy all the required files over to your server folder for you.
Sounds like you are missing all the resource files.

I personally have my various SpiderBasic apps in their own folder and I have a folder called "sbresources" that contains all the SpiderBasic resource libraries that are shared by all my apps. That way I don't have duplicates of all the library resource files in every app folder.

My create screen would look something like this...
Image
TheDarkZim
Posts: 5
Joined: Mon Apr 14, 2014 6:45 pm

Re: Can't run my app on my webserver

Post by TheDarkZim »

Thx, for your answer. I will try your settings tonight :)

Regards Zim
User avatar
Paul
Posts: 195
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: Can't run my app on my webserver

Post by Paul »

For anyone else, here is a better description...

For a simple copy of files over to the Server, I have a folder called "myappfolder" and I am compiling an app called "myapp".
SpiderBasic will copy all the required resources to run the app into the "myappfolder" with these settings:
Image


The next time you compile and copy the files over, you can uncheck the "copy Spider Basic resources" because the already exist and will only change with a new version of Spider Basic.

Image


The folder structure on your server will look like this:

Image


If I have a number of SpiderBasic apps on my server, I copy the "spiderbasic" folder from "myappfolder" and rename it to "sbresources"
+htdocs
|-- myappfolder
|--sbresources

Image


Then when I compile my app I change the libraries path to "../sbresources"

Image



Hope this makes more sense :)
TheDarkZim
Posts: 5
Joined: Mon Apr 14, 2014 6:45 pm

Re: Can't run my app on my webserver

Post by TheDarkZim »

Hi,

thank you for your help. I was finally able to get the app to run :D

Additional to the settings I had to set the correct user and group for the files. Somehow the folders didn't get the correct one.
Secondly I had to set the "enable Debugger" to true.

Regards Zim
Post Reply