設定不要で Node サーバーをデプロイ可能に
本文の状態
日本語全文を表示中
詳細モードで約1分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Vercel Blog
Vercel が、プロジェクトルートまたは src/server.ts に server.ts ファイルを検出すると、Express や Koa などと同様に設定不要で Node.js アプリケーションとしてデプロイする機能を追加した。
Continue in AI NEW LAB
このニュースを、実務の判断につなげる
AI NEW LABで、試したことや先に確認したい条件を共有できます。まずはログインなしで読めます。
AI NEW LABで論点を見るSource Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
今や、設定を一切行わずに Node.js サーバー を Vercel にデプロイできるようになりました。
Vercel はプロジェクトのルートディレクトリまたは src/server.ts 内に server.ts ファイルを検出すると、既存の設定不要なバックエンド(Express、Koa、NestJS など)と同様に、これを Node.js アプリケーションとしてデプロイします:
server.ts
import { createServer } from 'node:http'
const server = createServer((req, res) => {
res.end('Hello from Node.js on Vercel!')
})
server.listen(process.env.PORT ?? 3000)Vercel にデプロイされた Node アプリ
Vercel CLI を使用すれば、ローカル開発とデプロイの両方を処理できます:
ローカルでサーバーを実行する
vc dev
デプロイを作成する
vc deploy
どちらのコマンドも、設定ファイルは一切不要で自動的に server.ts を検出します。
Vercel 上のバックエンドは、Fluid compute と Active CPU プライシング によって駆動されています。
Vercel における Node.js ランタイム に関する詳細はこちらをご覧ください。
原文を表示
You can now deploy a Node.js server to Vercel with zero configuration.
Vercel detects a server.ts file at the project root or at src/server.ts and deploys it as a Node.js application, in addition to existing zero-configuration backends like Express, Koa, and NestJS:
server.ts
import { createServer } from 'node:http'const server = createServer((req, res) => { res.end('Hello from Node.js on Vercel!')})server.listen(process.env.PORT ?? 3000)A Node app deployed on Vercel
Vercel CLI can handle local development and deployment:
# Run the server locallyvc dev# Create a deploymentvc deployBoth commands pick up server.ts automatically, with no configuration files required.
Backends on Vercel are powered by Fluid compute with Active CPU pricing.
Learn more about the Node.js runtime on Vercel.
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み