npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fastboot-aws

v1.0.0-beta.2

Published

A FastBoot server for AWS

Downloads

11

Readme

FastBoot Server for AWS

This is a server for hosting Ember apps in FastBoot mode on AWS. It is based on the FastBoot App Server, configured to use the S3 downloader and S3 notifier.

FastBoot allows Ember apps to be rendered on the server, to support things like search crawlers and clients without JavaScript. For more information about FastBoot, see ember-cli-fastboot.

This server is designed to run either on Elastic Beanstalk or on your own EC2 servers. It also works just fine for non-AWS hosting environments, such as Heroku or Digital Ocean, if you want to use S3 for deploying and storing your built application assets.

This server follows standard Node.js conventions; you can start it with either npm start or node server.js and it respects the PORT environment variable:

# start the server on HTTP port 80
$ PORT=80 node server.js

Deploying on Elastic Beanstalk

Create S3 Bucket

Create an S3 bucket for uploading the FastBoot builds of your Ember.js application.

Create FastBoot Build

Inside your Ember.js application, run ember build. Once that finishes, zip up the resulting dist directory and upload it to the S3 bucket you just created.

Next, create a new file called fastboot-deploy-info.json. Edit it to have the following contents:

{
  "bucket": "BUCKET_YOU_CREATED",
  "key": "NAME_OF_DIST_ZIP_FILE"
}

Upload it to the same bucket that you uploaded the zipped dist to.

Create Elastic Beanstalk Application

The below instructions cover using the Elastic Beanstalk CLI tool. Feel free to use the web console or the API instead.

Install eb

First, install the Elastic Beanstalk CLI tool (pip install awsebcli) if you don't have it installed already.

Initialize the Application

Clone this repository and cd into it in your terminal. Initialize the directory as an EB application:

eb init

Enter your access key ID and secret access key if prompted. (You can also pass --profile to eb init to use a saved credential profile configured via the AWS CLI.)

Next, select your region. When prompted, choose the option to create a new application:

Select an application to use
1) [ Create new Application ]
(default is 1):

Give your application a name. The eb tool should automatically detect that the app is using Node.js; enter y when prompted.

Finally, decide whether you want to associate your instances with an SSH keypair (if you don't, you won't be able to SSH into the server once it's running).

Congratulations! You've created an Elastic Beanstalk app.

Create an Environment

Next, we'll need to create an environment. I like to create at least one environment for staging and one for production.

In the environment, we'll tell the server where to find the built app on S3 by setting environment variables.

Create an environment and give it the name of the S3 bucket as well as the key to the JSON file you created and uploaded:

eb create --envvars FASTBOOT_S3_BUCKET=<s3-bucket>,FASTBOOT_S3_KEY=<s3-key>

Enter a name and a DNS CNAME prefix. (The CNAME prefix is used to create a URL for your app; so if you enter ember-fastboot as the prefix, your URL will be ember-fastboot.elasticbeanstalk.com.)

Once you've entered this information, eb will automatically zip up the server and deploy it. You'll need to wait a few minutes while the entire environment—security group, load balancer, EC2 instances, etc.—all spin up.

After everything has been provisioned, you should see a message saying the environment has moved to the "Ok" state.

Congratulations! You've just deployed a cluster of auto-scaling FastBoot servers to Elastic Beanstalk.

Deploy FastBoot App

NOTE: A cluster of FastBoots is called a stampede.