46 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
		
		
			
		
	
	
			46 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| 
								 | 
							
								---
							 | 
						|||
| 
								 | 
							
								id: bd7158d8c443edefaeb5bd0e
							 | 
						|||
| 
								 | 
							
								title: URL Shortener Microservice
							 | 
						|||
| 
								 | 
							
								localeTitle: URL Shortener微服务
							 | 
						|||
| 
								 | 
							
								challengeType: 4
							 | 
						|||
| 
								 | 
							
								isRequired: true
							 | 
						|||
| 
								 | 
							
								---
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								## Description
							 | 
						|||
| 
								 | 
							
								<section id='description'> <code>0</code>构建一个功能类似于此的完整堆栈JavaScript应用程序: <a href='https://thread-paper.glitch.me/' target='_blank'>https</a> : <a href='https://thread-paper.glitch.me/' target='_blank'>//thread-paper.glitch.me/</a> 。 <code>0</code>在这个项目上工作将涉及您在我们的入门项目上的Glitch上编写代码。完成此项目后,您可以将公共故障网址(到应用程序的主页)复制到此屏幕进行测试!您可以选择在另一个平台上编写项目,但必须公开显示我们的测试。 <code>0</code>使用<a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-urlshortener/' target='_blank'>此链接</a>在Glitch上启动此项目或在GitHub上克隆<a href='https://github.com/freeCodeCamp/boilerplate-project-urlshortener/'>此存储库</a> !如果您使用Glitch,请记住将项目链接保存到安全的地方! 
							 | 
						|||
| 
								 | 
							
								</section>
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								## Instructions
							 | 
						|||
| 
								 | 
							
								<section id='instructions'> 
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								</section>
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								## Tests
							 | 
						|||
| 
								 | 
							
								<section id='tests'>
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								```yml
							 | 
						|||
| 
								 | 
							
								tests:
							 | 
						|||
| 
								 | 
							
								  - text: 我可以传递一个URL作为参数,我将在JSON响应中收到一个缩短的URL。
							 | 
						|||
| 
								 | 
							
								    testString: ''
							 | 
						|||
| 
								 | 
							
								  - text: '如果我传递的网址无效,并且不遵循有效的http://www.example.com格式,则JSON响应将包含错误。'
							 | 
						|||
| 
								 | 
							
								    testString: ''
							 | 
						|||
| 
								 | 
							
								  - text: “当我访问缩短的网址时,它会将我重定向到我原来的链接。”
							 | 
						|||
| 
								 | 
							
								    testString: ''
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								```
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								</section>
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								## Challenge Seed
							 | 
						|||
| 
								 | 
							
								<section id='challengeSeed'>
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								</section>
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								## Solution
							 | 
						|||
| 
								 | 
							
								<section id='solution'>
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								```js
							 | 
						|||
| 
								 | 
							
								// solution required
							 | 
						|||
| 
								 | 
							
								```
							 | 
						|||
| 
								 | 
							
								</section>
							 |