programing

호스트 서버에 MEAN 스택을 배포하는 방법은 무엇입니까?

css3 2023. 10. 22. 20:18

호스트 서버에 MEAN 스택을 배포하는 방법은 무엇입니까?

MEAN으로 잘 작동하는 웹사이트를 가지고 있고 현지에서 잘 작동합니다. 서버에 배포하고 싶지만 파일을 내 웹사이트 ftp에 업로드하는 것 외에는 웹사이트를 배포한 적이 없습니다.

지도하는 사람?

또 다른 좋은 출발점은 Digital Ocean일 것입니다. 그들은 원클릭 설치 MEAN 스택과 튜토리얼을 제공합니다.https://www.digitalocean.com/community/tutorials/how-to-use-the-mean-one-click-install-image

나는 방금 내 것을 배치했습니다.MEAN Stack application위에Heroku cloud application환경.구축 단계는 간단합니다.

배포 단계:

  1. 평균 스택 프로젝트 구조는 다음과 같아야 합니다.This is very important step. The bottonline is your package.json and server.js should be under your root directory. Have a look at the link to know more about the structure.
  2. 원격 저장소를 로컬로 복제합니다.git clone https://github.com/heroku/node-js-getting-started.git
  3. 복제된 저장소로 이동합니다.cd node-js-getting-started
  4. 달려.git add .
  5. 달려.git commit -m "Sample"
  6. 달려.Heroku login아무 키나 누른 다음 브라우저를 열고 로그인을 클릭하라는 메시지가 나타납니다.로그인한 후 브라우저 인스턴스가 닫혔습니다.
  7. 달려.heroku create myApp --buildpack heroku/nodejs.Note: Buildpacks are responsible for transforming deployed code into a slug, which can then be executed on a dyno. 많은 정보
  8. 달려.git push heroku master. 배포가 시작됩니다.
  9. 배포가 완료되면 명령 프롬프트 터미널에 전체 배포 로그가 표시됩니다.
  10. 이제 응용프로그램이 배포됩니다.앱의 인스턴스 하나 이상이 실행 중인지 확인합니다.heroku ps:scale web=1

  11. 달려.heroku open. 배포된 인스턴스를 실행합니다.

  12. 달려.heroku logs실행 중인 앱에 대한 정보를 볼 수 있습니다.더 많은 정보

자세한 내용은 다음 링크에서 확인할 수 있습니다.

https://devcenter.heroku.com/articles/getting-started-with-nodejs#prepare-the-app https://devcenter.heroku.com/articles/deploying-nodejs

여기서부터 시작...https://github.com/linnovate/mean#hosting-mean 어떤 운영체제에서 호스팅할 계획입니까?

언급URL : https://stackoverflow.com/questions/23759401/how-to-deploy-mean-stack-to-my-hosted-server