Run express server web application on Amplify?

0

Hi Everyone,

I would like to migrate our existing Vue/Node web application from Heroku to Amplify. The app runs on an express server (i.e., "start": "node server.js" in the package.json). But it seems that Amplify is not starting the server, and instead using it's own web server. Is it possible to configure Amplify to use the express server instead?

質問済み 1ヶ月前121ビュー
2回答
0

Yes, it's possible to deploy an Express server-based web application on AWS Amplify. Amplify primarily supports frontend web applications and serverless backends, but you can still deploy server-side applications like Express servers with a little bit of modifications.

profile picture
回答済み 1ヶ月前
  • Hi Bhagavan, thanks for your reply. To be clear, I am talking about a frontend web application, but in our case it uses an express server. Do you have any links to tutorials on how to do this? I've seen some documentation on SSR apps, but not sure they're relevant.

0

Deploying a Nuxt 3 web app (Is that it ?) from any repo using Amplify involves these steps:

  1. Initialize Amplify and add hosting.
amplify init
amplify add hosting

  1. Configure Amplify hosting to point to your Express server code in deploy-manifest.json.
  2. Connect your Git repo in the Amplify console.
  3. Add a post-build script in package.json to copy build artifacts to .amplify-hosting.
"scripts": {
  "build": "nuxt build",
  "postbuild": "cp -r dist/. .amplify-hosting/"
}
  1. Commit and push code to trigger Amplify deployment.
  2. Access your app at the default URL provided. Amplify handles backend infrastructure.
profile picture
エキスパート
回答済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ