Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrong Git clone command & package/tsconfig.json configuration #835

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions solutions/node-hello-world/.vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"redirects": [
{
"source": "/",
"destination": "/api/hello",
"permanent": false
}
]
}
11 changes: 8 additions & 3 deletions solutions/node-hello-world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ You can choose from one of the following two methods to use this repository:

### One-Click Deploy

Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples):
Deploy the example using [Vercel][1]:

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/examples/tree/main/solutions/node-hello-world&project-name=node-hello-world&repository-name=node-hello-world)
[![Deploy with Vercel](https://vercel.com/button)][2]

### Clone and Deploy

```bash
git clone https://github.com/vercel/examples/tree/main/solutions/node-hello-world
mkdir -p ~/Desktop/Vercel-Node-serverless
cd ~/Desktop/Vercel-Node-serverless
npx get-git-folder https://github.com/vercel/examples main solutions/node-hello-world
```

Install the Vercel CLI:
Expand All @@ -29,3 +31,6 @@ Then run the app at the root of the repository:
```bash
vercel dev
```

[1]: https://vercel.com/?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples
[2]: https://vercel.com/new/git/external?repository-url=https://github.com/vercel/examples/tree/main/solutions/node-hello-world&project-name=node-hello-world&repository-name=node-hello-world
8 changes: 8 additions & 0 deletions solutions/node-hello-world/api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext"
},
"include": ["**/*"]
}
10 changes: 7 additions & 3 deletions solutions/node-hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
"repository": "https://github.com/vercel/examples.git",
"license": "MIT",
"private": true,
"type": "module",
"engines": {
"node": ">=18"
},
"devDependencies": {
"@types/node": "^17.0.42",
"@vercel/node": "^2.9.6",
"typescript": "^4.7.3"
"@types/node": "^18.18.13",
"@vercel/node": "^3.0.11",
"typescript": "~5.3.2"
}
}