Skip to content

Instantly share code, notes, and snippets.

@dominicumbeer
Last active February 9, 2017 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dominicumbeer/11bd48e6316737775fd2151b76e46186 to your computer and use it in GitHub Desktop.
Save dominicumbeer/11bd48e6316737775fd2151b76e46186 to your computer and use it in GitHub Desktop.
Coding Challenge - Full-Stack JavaScript Engineer

Coding Challenge

The challenge is to develop an application similar to bit.ly - the link shortener.

Back-end part

There should be an HTTP API provided. The actual framework doesn’t matter, it could be express.js / hapi.js etc.

HTTP API should provide such interface,

  • Create new short link
HTTP POST /v1/links

Payload,

{
	"url": "<target-url>"
}

Response,

{
	"hash": "<short-link-hash>"
}
  • Access short link
HTTP GET /v1/{short-link-hash}

As response the API should redirect to target-url.

Bonus

Implement routes to manage an existing link, like updating the target url or entirly delete a link from the system.

Front-end part

Provide the simple UI for the link management of the link shortener, build with React / Redux.

The UI should contain a form, to submit a target url and get a short link as the result of submission.

Bonus

Extend the UI to manage the links.

Assumptions

  1. The server persistence layer (database) is not required, in memory storage can be used. But, usage of some database (SQL, MongoDB etc.) is not prohibited.
  2. HTTP API project should be run with npm start and spawn a local server at port 8888.
  3. UI project should be run with npm start and start a local server at port 8889.
  4. Wherever it’s applicable, tests should be provided.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment