fix(learn): enhance user stories for header parser project (#39964)

* fix(learn): enhance user stories for header parser project

* Update curriculum/challenges/english/05-apis-and-microservices/apis-and-microservices-projects/request-header-parser-microservice.md

Co-authored-by: Manish Giri <manish.giri.me@gmail.com>

Co-authored-by: Manish Giri <manish.giri.me@gmail.com>
pull/39979/head
Tom 2020-10-14 17:49:02 -05:00 committed by GitHub
parent 5164b09dab
commit 3131360318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 7 deletions

View File

@ -7,9 +7,13 @@ forumTopicId: 301507
## Description
<section id='description'>
Build a full stack JavaScript app that is functionally similar to this: <a href='https://request-header-parser-microservice.freecodecamp.rocks/' target='_blank'>https://request-header-parser-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 <a href='https://repl.it/github/freeCodeCamp/boilerplate-project-headerparser' target='_blank'>this link</a> or clone <a href='https://github.com/freeCodeCamp/boilerplate-project-headerparser/'>this repository</a> on GitHub! If you use Repl.it, remember to save the link to your project somewhere safe!
Build a full stack JavaScript app that is functionally similar to this: <a href='https://request-header-parser-microservice.freecodecamp.rocks/' target='_blank'>https://request-header-parser-microservice.freecodecamp.rocks/</a>. Working on this project will involve you writing your code using one of the following methods:
- Clone <a href='https://github.com/freeCodeCamp/boilerplate-project-headerparser/'>this GitHub repo</a> and complete your project locally.
- Use <a href='https://repl.it/github/freeCodeCamp/boilerplate-project-headerparser' target='_blank'>our repl.it starter project</a> to complete your project.
- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field.
</section>
## Instructions
@ -22,16 +26,16 @@ Start this project on Repl.it using <a href='https://repl.it/github/freeCodeCamp
```yml
tests:
- text: I can provide my own project, not the example URL.
- text: You should provide your own project, not the example URL.
testString: |
getUserInput => {
assert(!/.*\/request-header-parser-microservice\.freecodecamp\.rocks/.test(getUserInput('url')));
}
- text: 'Your IP address should be returned in the <code>ipaddress</code> key.'
- text: 'A request to `/api/whoami` should return a JSON object with your IP address in the <code>ipaddress</code> key.'
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/api/whoami'').then(data => assert(data.ipaddress && data.ipaddress.length > 0), xhr => { throw new Error(xhr.responseText)})'
- text: 'Your preferred language should be returned in the <code>language</code> key.'
- text: 'A request to `/api/whoami` should return a JSON object with your preferred language in the <code>language</code> key.'
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/api/whoami'').then(data => assert(data.language && data.language.length > 0), xhr => { throw new Error(xhr.responseText)})'
- text: 'Your software should be returned in the <code>software</code> key.'
- text: 'A request to `/api/whoami` should return a JSON object with your software in the <code>software</code> key.'
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/api/whoami'').then(data => assert(data.software && data.software.length > 0), xhr => { throw new Error(xhr.responseText)})'
```