CameronJS Logo

CameronJS

This is the first page displayed when you create an app with CameronJS and start the development server. We're keeping it here so you can access it even after you overwrite the file code/html/index.html.

Getting Started

You'll find this file at code/html/index.html Before you start editing it there are a couple of things you should know:

  • Unless you already know what you're doing, for now we recommend keeping everything between the <head> ... </head> tags so that your CSS and JS is included, your site resizes itself for mobile and a couple of other helpful things.
  • Don't worry about losing the info on this page, you can always see it at https://cameronjs.com/welcome.
  • Check out https://cameronjs.com/intro for a tutorial that walks you through the features of CameronJS.

If you want to add some images to your site, those go in publish/images (you'll find the CameronJS logo logo in there now). Go to code/stylesheets for your CSS and code/javascripts for your JS (you'll find some comments in there to get you started with both). Want to change the little icon that goes in the tab in your browser? That's publish/favicon.png

Deploying

Ready to get this site online? First make sure everything is committed to your GitHub, GitLab or Bitbucket account. For example, to push your code up to GitHub first create a new repository and then run the following commands:


git add .
git commit -am 'First commit'
git remote add origin git@github.com:cannikin/first-cameronjs-app.git
git push -u origin master

The git@github.com:cannikin/first-cameronjs-app.git part should be the URL that GitHub gives you for your own repository.

Now create an account over at Netlify After verifying your email click the New Site from Git button in the Sites section. Show Screenshot

Pick your host and find your new repo. Show Screenshot

In a minute or less your site will be online! Click the URL under your site name to see. Show Screenshot

Follow the Getting started instructions in Netlify to set up a custom domain and SSL. Bet you've never had a site online that fast! And every time you push changes to your code Netlify will automatically re-deploy your site for you.

Going further

Head over to https://cameronjs.com/first-app to build an actual app that allows users to signup and be notified via email when it's going to rain. We'll use Netlify's Forms and Functions to build a full webapp with no server or database. It's the future!

Have fun!