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:
Kristofer Koishigawa 2024-02-14 23:24:03 +09:00 committed by GitHub
parent 3c7f56f8ed
commit cd1ce67879
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 21 additions and 5 deletions

2
.gitattributes vendored
View file

@ -1,2 +0,0 @@
# Tell Linguist to exclude HTML files to help Replit language detection.
*.html linguist-vendored

1
.gitignore vendored
View file

@ -1 +1,2 @@
node_modules
.env

14
.gitpod.yml Normal file
View 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

View file

@ -1 +0,0 @@
.replit

3
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"workbench.colorTheme": "freeCodeCamp Dark Theme"
}

View file

@ -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
View file

@ -0,0 +1 @@
PORT=3000