Running Aurelia without a server in Firefox - firefox

I know a lot of 'recent' JS tech require a server to work, but is there a way to run a simple Aurelia hello world without a server installation, just opening index.html and see my hello world app shown in the browser. It works for angular 1.x and many other JavaScript libraries.
Is the System.import mechanism going to force me to use a server ? Or is there a workaround to read local files, I tried the usual hacks but it did not help as I still get Error: [Exception... "File error: Unrecognized path" nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)" but the path shown in the error (not pasted here) matches my local path.

The Aurelia starter pack recommends using Firefox to accomplish this goal if you are using the ES2016 starter kit. Firefox is the only browser that supports the use case you are asking about.
For any other browser, you will need to run a server. I recommend using the extremely simple to use http-server that runs on NodeJS.
From within your project directory type the following two commands:
npm install -g http-server
http-server
Then open your browser and navigate to http://localhost:8080 (8080 is http-server's default port. This port can be changed using the -p command line argument.

Related

Google cloud app engine - How to edit code using SSH and debug-mode

I am trying to debug an application I have deployed to google cloud app engine. Reading the docs, I figured out that in order to do so I have to enter the debug mode using
gcloud app --project [Project ID] instances enable-debug
afterwards I am able to SSH into my instance and access root. Now I would like to edit some of the files. However, trying to use vim or nano does not seem to work.
Is there a way to edit those files without re-deploying the entire app?
Once you SSH into the App Engine instance and open a shell into the Docker container, you'll need to download the package list before installing nano or vim:
apt-get update && apt-get install nano
Then you can edit your app's files (which are in /app):
nano composer.json
The deployed app runs live code. It is not generally feasible to edit it. Moreover, changes made to the running container are not permanent; in fact they and are lost at the first re-start.
You may find some information on the Debugging an Instance page.
Unrelated to the above, an actual command-line editor is offered in the cloud shell.

Stuck on Google Home Tutorial

I am working on an intro to Actions on Google tutorial. I made it to page 4 and I am stuck on the "Fulfillment Webhook and Deployment" stage. I put the sample backend code into a Go file called populationai.go. I'm confused as to how to do the commands listed in the "Using ngrok to locally run the Webhook" section in Windows, as they are designed for a different operating system. Should I be doing these steps in the command prompt of Windows in the first place? Thanks.
https://www.programmableweb.com/news/how-to-get-started-google-actions/how-to/2017/01/31?page=4
Here are the steps I'm confused on:
We start up the Go application, which exposes the API Server via go run populationapi.go
$ go run populationapi.go
We start ngrok to expose a secure public tunnel on port 9000 via the following command:
$ ngrok http 9000
Edit: every time I try the "go run populationapi.go" command it says
'go' is not recognized as an internal or external command,
operable program or batch file.
Edit: my go file is located on my desktop. Is the issue the location of the file? The installer put Go distribution in c:\Go.
The error means you do not have Go installed.
You need to install go, also known as Golang to run that example code they provide on Step 4.
Make sure to follow the installation instructions as well.
It was just an example. You can write the code in any language as well.

MobileWeb - do not minify

I am trying to export my project as a mobileweb app, but I do not want the code to minified as I need to run some tests on it.
I can't find a way to package the app without having it minified.
I have seen that if I run the app in the browser, it is not minified. However, I am not able to access the files in the file system as I have no idea to where http://127.0.0.1:8020/ points.
Does anyone knows how to export a mobileweb app without js minification?
You need to build your mobile web app from the command line using the following:
appc run -p mobileweb
or
ti build -p mobileweb
By default, the --deploy-type option will be set to development which will not minify the JS code.
At this point you can either set /path/to/your/project/build/mobileweb as your web root or copy the files in the build/mobileweb directory to your web server.
It appears mobileweb is not supported for the --skip-js-minify flag. It's only available for iOS and Android (CLI docs)
Example: titanium build -p ios --skip-js-minify
You can watch ticket TIMOB-14253 for updates.

Using NGINX server to deploy a Meteor App from Amazon Linux AMI 2013.09.2 instance receive Module Error

I am attempting to deploy my first web application (a version of Telescope from the MeteorJS framework) via Heroku to a custom subdomain from a Amazon Linux AMI 2013.09.2 instance. I am following along with this tutorial - http://satishgandham.com/2013/12/a-complete-guide-to-install-production-ready-telescope-on-your-own-server/ - but once I attempt to run Telescope using PORT=3000 MONGO_URL=mongodb://localhost:3000/Telescope ROOT_URL=http://ec2-54-193-42-229.us-west-1.compute.amazonaws.com node client/main.js, I receive this error message: Error: Cannot find module '/home/ec2-user/bundle/programs/server/node_modules/fibers/client/main.js'
What I have attempted to do to solve this problem is performed cp || mv on the file main.js which is originally located in the ~/Telescope/client directory over to /home/ec2-user/bundle/programs/server directory and even '/home/ec2-user/bundle/programs/server/node_modules/fibers but I cannot seem to separate main.js from the /client directory. I am not sure if that is the issue or if there is some other underlying problem but I want to find a work around to using a proxy server at this point. I thought that moving the main.js file out of the /client directory was sufficient but apparently not. I am not sure it is imperative for my purposes to continue attempting to use a proxy but if there is a fix, I would not mind learning about it.
Or if any one could direct me on how this - https://github.com/aldeed/deploymeteor/ - could be a potential work-around to using an NGINX server proxy your help would be much appreciated.
You are getting the error because you are not running the command from your home folder.
You were at bundle/programs/server/node_modules/fibers.
Either use absolute path for client/main.js, or cd to ~
MONGO_URL=mongodb://localhost:3000/Telescope ROOT_URL=http://ec2-54-193-42-229.us-west-1.compute.amazonaws.com node client/main.js
PS: It will be helpful for others if you asked the question on the post itself, instead of here

Zend Framework 2 Getting Started on WAMP server

I have been trying to follow this tutorial: Tutorial
I can't get past page 2. When I try to run the command:
php composer.phar create-project --repository-url="http://packages.zendframework.com" C:\wamp\www\zendTutorial
I get these messages:
[RuntimeException]...[Composer\Downloader\TransportException]<br>
The "http://packages.zendframework.com/packages.json" file could not be downloaded: failed to open stream: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
I enabled ssl_module in the Apache modules and php_openssl in PHP extensions and a runtime error window popped up which I didn't read because I thought I would restart the server and everything would be okay.
Then I found out I had to create a private/public key pair so I followed this tutorial: tutorial
But I realized I skipped the step where I have to download WSAS (the 3rd application to download just to get this pig to oink) to export my pk from the keystore and I decided to put on the brakes and ask "really?" Is there a shortcut I can take to bypass all this crap so I can start with the tutorial? I've been at this for the past 3 hours and I am so fed up - it's demoralizing.
Note Another way to install the ZendSkeletonApplication is to use github. Go to https://github.com/zendframework/ZendSkeletonApplication ...
Try it this way. Get git and clone the repository from
https://github.com/zendframework/ZendSkeletonApplication.git
To do this, change in console (cmd.exe) to your workspace and type
git clone https://github.com/zendframework/ZendSkeletonApplication.git
It should create a subfolder ZendSkeletonApplication with the skeleton application inside.
Later when you have your skeleton application project you can run composer as described in the tutorial to get the dependencies.

Resources