¥Deployment
Remix 维护了一些 入门模板,以帮助你从一开始就部署到各种服务器。你应该能够在几分钟内初始化你的应用并使其上线。
¥Remix maintains a few starter templates to help you deploy to various servers right from the start. You should be able to initialize your app and get it live within a couple of minutes.
使用 --template
标志运行 npx create-remix@latest
允许你提供以下模板之一的 URL,例如:
¥Running npx create-remix@latest
with the --template
flag allows you to provide the URL to one of these templates, for example:
npx create-remix@latest --template remix-run/remix/templates/express
每个目标都有独特的文件结构、配置文件、需要运行的 CLI 命令、需要设置的服务器环境变量等。因此,阅读 README.md 文件来部署应用非常重要。它包含了在几分钟内让你的应用上线所需的所有步骤。
¥Each target has unique file structures, configuration files, cli commands that need to be run, server environment variables to be set, etc. Because of this, it's important to read the README.md to deploy the app. It's got all the steps you need to take to get your app live within minutes.
此外,Remix 不会抽象你的基础架构,因此模板不会隐藏任何有关你部署到哪里的信息(除了 Remix 应用之外,你可能还需要其他功能!)。你可以根据自己的需求调整配置。Remix 在你的服务器上运行,但它不是你的服务器。
¥Additionally, Remix doesn't abstract over your infrastructure, so the templates don't hide anything about where you're deploying to (you may want other functions besides the Remix app!). You're welcome to tweak the configuration to suit your needs. Remix runs on your server, but it is not your server.
简而言之:如果你想部署你的应用,请阅读手册。 😋
¥In a nutshell: if you want to deploy your app, Read the manual 😋