William Shatner is a URL shortener written in JavaScript. This is just a quick side project used to practice a few skills across the full web stack. Is using ES6, React/Redux, a VM manager for the local dev environment, and an automated testing/building/deployment system a little overkill for a project of this size? Yes. Absolutely. Was it fun to build? Heck yeah!
GitHub Source: https://github.com/ninjascribble/williamshatner
William Shatner requires NodeJS 6.3+. It takes advantage of a number of
ES6 features that are not available in prior versions. For the best experience you'll also want to
have both VirtualBox and
Vagrant installed. Then just run make
, let the build process
complete, and visit your local version at http://localhost:8080.
Vagrant is a virtual machine manager that allows filesystem sharing between a host and the VM. If this is your first time using it, then expect it to take a while to download the base VM image. Once the image has been downloaded a VM will be created and provisioned, and you'll be ready to go. This project has only been tested on OS X El Capitan. Your mileage may vary.
default
: Installs dependencies, runs tests, builds the client-side code, and starts/provisions the virtual machine.test
: Runs all testsclient.dev
: Compiles the client-side code for dev. Includes source maps. The client-side code is recompiled any time a file is changed and saved.client.build
: Compiles the client-side code for production. Minified, uglified, and ready to ship.server.restart
: Restarts the NodeJS service. Run this whenever you want to deploy server-side changes.server.logs
: Tails the server logs.vm.deploy
: Test the deploy process against your VM. This is useful prior to committing changes that will be picked up and deployed by the CI service.
William Shatner is a side project, and not really meant for production use. A few things that would love some love include:
- More test coverage
- A list of URLs the current user has shortened
- A list of popular/recent URLs
- Websocket support:
- See popular/recent URLs in real-time
- See click counts in real-time