Build a full stack JavaScript app that is functionally similar to this: <ahref='https://url-shortener-microservice.freecodecamp.rocks/'target='_blank'>https://url-shortener-microservice.freecodecamp.rocks/</a>.
Working on this project will involve you writing your code on Repl.it on our starter project. After completing this project you can copy your public Repl.it URL (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.
Start this project on Repl.it using <ahref='https://repl.it/github/freeCodeCamp/boilerplate-project-urlshortener'target='_blank'>this link</a> or clone <ahref='https://github.com/freeCodeCamp/boilerplate-project-urlshortener/'>this repository</a> on GitHub! If you use Repl.it, remember to save the link to your project somewhere safe!
- text: "You can POST a URL to `/api/shorturl/new` and get a JSON response with `original_url` and `short_url` properties. Here's an example: `{ original_url : 'https://freeCodeCamp.org', short_url : 1}`"
testString: "async getUserInput => {
const url = getUserInput('url');
const urlVariable = Date.now();
const res = await fetch(url + '/api/shorturl/new/', {
throw new Error(`${getResponse.status} ${getResponse.statusText}`);
}
}
"
- text: "If you pass an invalid URL that doesn't follow the valid `http://www.example.com` format, the JSON response will contain `{ error: 'invalid url' }`"
testString: "async getUserInput => {
const url = getUserInput('url');
const res = await fetch(url + '/api/shorturl/new/', {