N.B. This app is work in progress...
To start a local development server that serves the content of the public directory run the following command in the terminal from the worspace root directory:
./sspa server
or ./sspa liveserver
if you want to install LiveReloadX from command-line,
and then access to http://localhost:9292
.
The server action in sspa script launches a simple Python web server that serves static content and if you have chosen to use LiveReload, it automatically reload the web app during development whenever the server detects that a file on the disk has changed.
sudo easy_install pip
sudo pip install awscli
- Open the AWS console, creating an accont if necessary;
- Click the Identity & Access Management service under Security & Identity.
- In the left sidebar, click Users.
- Click Create New Users to create a user. We'll use this user account to deploy our app.
- Pick a name for you user and fill in the first row.
- Ensure that "Generate an access key for each user" ccheck box is checked, and click Create.
- Download the credentials when prompted.
N.B. You will need to provide a password for this user.
Then run:
aws configure --profile admin
AWS Access Key ID [None]: ABCDEFG...
AWS Secret Acess Key [None]: @Jdwkfdjsjfds9udiso...
Default region name [None]: eu-west-1
Default output format [None]:
Now that you've configured AWS CLI, you should have a new file in your home directory ~/.aws/credentials
.
Run the following to create the S3 bucket
./sspa create_bucket learnjs.tarantino.io
and then run
./sspa deploy_bucket learnjs.tarantino.io
to deploy the app.
To run tests we are going to use the Jasmine testing framework.
If you have the app loadeBy visiting /test/index.html
you should see tge test output and if you are locally using LiveReload this page will automatically reload.
It's important to deploy tests to production so if you have a user who's reporting a problem, a quick way to troubleshoot what is going on can be to ask the user to browse to 'tests' and make sure they all pass. I not, the user can copy and paste the output and sent it to you. You can then try to reproduce the failing test as a proxy for reproducing the error that the user is reporting.