🚀 Deploy your code!

Sean McPherson
6 min readSep 10, 2018

--

A quick guide to deploying your code (Photo by SpaceX on Unsplash)

Imagine the following scenario: you are a self-learned programmer or recent coding bootcamp graduate who is struggling to find a first development job. You’ve been learning a lot, working on projects, and have some good examples on your GitHub, but you can’t seem to get through the screening process to an interview.

What can you do? How can you better position yourself to get a job in the industry?

Set yourself apart

Before I sound like a snake-oil salesman, I want to admit: there are many reasons why you might be having trouble finding a first job. You might have a bad resume, be applying for the wrong positions, or be looking in the wrong market.

But there is one sure-fire way to increase your chances of breaking through the noise: deploy your code.

The hard truth

It is crucial as a job seeker to showcase your new coding skills on a platform like GitHub. Add repositories, commit often, pin your best work, and make sure to create a property description and README. A polished GitHub account communicates to an potential employer that you are a professional who is serious about coding.

Despite all that, the reality is that no hiring manager is going to clone your repositories just to check out your projects. Sure, s/he might click through and scan the code, but no one has time to do that for every project of every applicant. So you need to do that work for them. You need to deploy it.

No hiring manager is going to clone your repositories just to check out your projects.

Uh… “deploy”?

The the world of software development, deployment “encompasses all the processes involved in getting new software or hardware up and running properly in its environment” (TechTarget). In more simple terms, deploying your code means getting it up and running for other people to use.

In years past, deploying code might have been as simple as uploading a few HTML, CSS, and JS files to a web host (this still might be a good solution for you, depending on the project). Today, chances are you will want a more robust environment that can run node.js in deployment.

Before your eyes glaze over: take a deep breath.

There are services out there that make deploying projects quick and painless. Here are a few options that can help you get your projects up and running for the world to see.

CLI Deployment

There are a few CLI (command line interface) options for rapidly deploying your code.

Surge

Surge is a simple, single command for web publishing. They boast the ability to publish HTML, CSS, and JS for free, without leaving the command line.

1. Set up

$ npm i -g surge

2. Navigate to a project

$ cd my-web-project
$ ls
index.html main.js styles.css

3. Deploy!

$ surge

Done and done! Surge gives you a link where you can view your project in deployment.

Surge also offers the ability to customize your subdomain on surge.sh, and even supports a custom url (e.g. your-name.com). Checkout for information on surge.sh.

now

Now is created by the folks at ZEIT for getting your applications to the cloud with ease, speed and reliability. Any project with a package.json or Dockerfile can be deployed with the `now` command.

1. Set up

$ npm i -g now

2. Navigate to a project

$ cd my-node-project
$ ls
package.json index.js

3. Deploy!

$ now

That’s it! With one word, now too generates a url for the live project.

Now has some cool features that utilize githooks for redeployment, and a desktop client to better visualize and manage your projects. Checkout now out at zeit.co/now.

GitHub Pages

GitHub Pages allows you to host personal, organization, or project pages directly from a GitHub repository. The service is both easy, useful, and popular — utilized by individuals, communities, and companies alike.

Note: GitHub Pages is a static site hosting service and doesn’t support server-side code such as PHP, Ruby, or Python. Pages are also subject to some usage limits.

Once deployed, sites on GitHub Pages are conveniently available at https://<username>.github.io/<repo>, which is a great way to keep your applications on brand.

Static websites

For a static website — just HTML, CSS, and JavaScript — GitHub Pages can be activated with just two clicks.

1. Go to “Settings”

Go to your repository’s settings and scroll down to the “GitHub Pages” section.

2. Select a branch

In the dropdown, select the branch that you wish to deploy. Then hit “Save”.

And that’s it! Your site will be live at https://<username>.github.io/<repo>.

For a more detailed description of deploying a static website to GitHub Pages, check out this tutorial (with a live example).

React

GitHub Pages is also a great solution for hosting simple React applications. Facebook provides a great step-by-step tutorial for deploying a create-react-app on GitHub Pages.

By adding gh-pages to your application and a few scripts to the application.json, you can deploy your React app with a simple command:

npm run deploy

I’ve used the tutorial (which is included in the create-react-app README.md) to deploy most of my React apps.

Other options

If you are looking to host a back-end application or just looking for more robust management features, here are some additional deployment options:

Netlify

Netlify bills themselves as a “all-in-one platform for automating modern web projects.” They seamlessly sync with hosted respositories and deploy after a simple build configuration. I have used Netlify before and was super impressed with their free features.

To give Netlify a try, start with their guide for getting started on the platform.

Heroku

Heroku is a cloud application platform for developers, teams, and businesses of all sizes to deploy, manage, and scale apps. They have tons of features and price plans from free to enterprise.

To get started on Heroku, check out their Dev Center Guide.

Web Hosting

Sometimes the best deployment solution for your project will be good old-fashioned web hosting. A web host provides you space on a server to store files which they’ll serve up when a user hits your IP or URL address.

In reality, all the aforementioned services are providing web hosting, but I’m talking about classic web hosts like MediaTemple or BlueHost.

Working with a web host can provide valuable “webmaster” experience to any web developer, even if it comes at the cost of $5–10 per month. Plus, they most provide custom email options so you can have name@yourdomain.com.

I currently use GreenGeeks, but I have used multiple web hosts in the past; they all provide basically the same service. Pick the provider that feels best to you.

In addition to the web hosts linked above, also checkout: DreamHost, and HostGator.

READ THIS AFTER DEPLOYING YOUR CODE

Congrats; you did it! Take a moment and celebrate. Then, copy that beautiful URL, send it to your friends and family, and put it two very important places: GitHub and your resume.

GitHub

Go to the project’s repository and click “Edit” to the top and right. In the “Website” box, paste your project’s live URL, then save. Now anyone who finds themselves looking at your repo (e.g. hiring managers) will be able to easily click the link and see the code in action.

Site note: If you haven’t added a description to your repository, do that now too. Keep it short and descriptive (and feel free to use emojis 👍).

Resume

Your resume should have a separate section to feature your projects. In this section, you should include the name, description, and repo link for your best work. Now add the deployed URL to the project.

Make sure your word processor doesn’t automatically turn your URL into a hyperlink. Hiring managers won’t be able to click a piece of paper (duh), and the default blue underlined text won’t look professional on your resume.

tl;dr

Finding a first developer job is hard, but deploying your code can increase your chances of breaking through. Using any of the solutions above to deploy your code will give you valuable developer experience and give you a leg up on your job hunting competition.

I hope all that helps! Let me know in the comments below if there are any deployment resources that you think I should add to this list.

Happy coding!

--

--

Sean McPherson

Software engineer @ Khan Academy. JavaScript, React, and Node.js. Formerly Niche & TSYS. Soli Deo gloria.