Feb

25

Deployed my own simple React project to Surge.


Really stoked, just thought I’d write a short blurb because my challenge this week for myself was to deploy this small project I did in React JS to the web. 

I have been working with webpack but never had the need to publish before and was not sure how to manipulate the code to 1. Create a bundle.js for me, and 2. Have it where it needs to be in order to work when deployed.

A little background on the project, it was to create a responsive front end design in React where I brought in LESS for styling and choose a slider of choice for the top header slider.

In the past, I have used react-bootstrap, and coded up my own slider as well, I have used slick on generic projects in the past so I decided to use it again because I never noticed they had a react friendly version.

I thought this page looked really clean and pretty when I finished it so I wanted to deploy it out there somewhere. I heard about this new endpoint called Surge and how easy it was supposed to be to deploy.

IT WAS EASY, as soon as npm run build creates the bundle.js for you which was where I got stuck. So, without further ado, my simple responsive front end.

http://special-project.surge.sh/

Just one more note, now that I get a build, I can deploy just about anywhere, that step was a pre-requisite for most deployment sites.

Leave a Reply