feat: init gitpod config (#103)
* feat: init gitpod config * fix: default to port 3000, add sample.env file, and ignore .env file
This commit is contained in:
		
							parent
							
								
									3c7f56f8ed
								
							
						
					
					
						commit
						cd1ce67879
					
				
					 7 changed files with 21 additions and 5 deletions
				
			
		
							
								
								
									
										2
									
								
								.gitattributes
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitattributes
									
										
									
									
										vendored
									
									
								
							|  | @ -1,2 +0,0 @@ | |||
| # Tell Linguist to exclude HTML files to help Replit language detection. | ||||
| *.html linguist-vendored | ||||
							
								
								
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -1 +1,2 @@ | |||
| node_modules | ||||
| .env | ||||
|  |  | |||
							
								
								
									
										14
									
								
								.gitpod.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								.gitpod.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| image: gitpod/workspace-node-lts | ||||
| 
 | ||||
| ports: | ||||
|   - port: 3000 | ||||
|     onOpen: open-preview | ||||
|     visibility: public | ||||
| 
 | ||||
| tasks: | ||||
|   - init: npm install | ||||
|     command: npm run start | ||||
| 
 | ||||
| vscode: | ||||
|   extensions: | ||||
|     - https://github.com/freeCodeCamp/freecodecamp-dark-vscode-theme/releases/download/v1.0.0/freecodecamp-dark-vscode-theme-1.0.0.vsix | ||||
|  | @ -1 +0,0 @@ | |||
| .replit | ||||
							
								
								
									
										3
									
								
								.vscode/settings.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.vscode/settings.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| { | ||||
|   "workbench.colorTheme": "freeCodeCamp Dark Theme" | ||||
| } | ||||
							
								
								
									
										4
									
								
								index.js
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								index.js
									
										
									
									
									
								
							|  | @ -26,7 +26,7 @@ app.get("/api/hello", function (req, res) { | |||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // listen for requests :)
 | ||||
| var listener = app.listen(process.env.PORT, function () { | ||||
| // Listen on port set in environment variable or default to 3000
 | ||||
| var listener = app.listen(process.env.PORT || 3000, function () { | ||||
|   console.log('Your app is listening on port ' + listener.address().port); | ||||
| }); | ||||
|  |  | |||
							
								
								
									
										1
									
								
								sample.env
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								sample.env
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| PORT=3000 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue