Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
Bentley 中国优先社区
  • Welcome to Bentley Communities
  • Bentley's Communities
  • Bentley 中国优先社区
  • Cancel
Bentley 中国优先社区
技术资料库 12-部署应用
    • Sign In
    Bentley 中国优先社区 requires membership for participation - click to join
    • +Bentley 中文技术资料库
    • -iTwin 数字孪生平台
      • Connector(原名Bridge)
      • i-twin微信小课堂
      • -iModel.js
        • +01-iModel.js资源
        • -02-iModel.js初步
          • 01-开始使用iModel.js
          • 02-简介
          • 03-为何使用iModel.js
          • 04-iModel上传
          • +05-iModel.js处理CSV文件
          • 06-简单的浏览应用
          • 07-数据显示
          • 08-前端和后端
          • 09-超级URLs
          • 10-iModel项目
          • 11-系统集成应用
          • 12-部署应用
          • 13-与微软IOT集成
          • 14-BIS数据结构
          • 15-快速开始
        • +03-iModel.js专题应用
      • +iTwin工作流程
      • +iTwin技术主题
    • Bentley二次开发资料库
    • +常见问题汇总
    • Bentley-Learn 官方教学平台-使用方法
    • +中国优先社区使用指南
    • +Bentley学习资料库
    • +Bentley用户成功活动精选
    • +服务合作伙伴计划

     
     Questions about this article, topic, or product? Click here. 

    12-部署应用

    说明:

    原文刊登在Medium.com/imodeljs站点,作者: Roop Saini

    中文翻译:

    正在进行中...

    英文原文:

    You may have spent hours working on a brand new iModel.js app that is going to revolutionize the infrastructure industry…or you may just be tired of sending zips of your code across the globe. You have decided —

    It’s time to deploy your app.

    It’s truly incredible when you can copy a link, send it to someone, and finally witness the moment that developers strive to experience:

    However, you may be overwhelmed by the myriad of web hosting options and configurations out there.

    Good news! We have been deploying lots of iModel.js apps as static sites on Azure. Since Azure is a professional grade solution, we have decided to share this process with you. Let’s break it down into three simple steps:

    1. Get URL
    2. Register App
    3. Deploy Code

    They all come with concise ~ 1-minute video clips :)


    1. Get URL

    The first thing we need to do is get a URL for our app. This involves creating a new resource on Azure and configuring it as a static website.

    Bonus: Azure comes with a 30-day trial so you can start right away for free.

    2. Register App

    Once we have a URL, we need to register an application on the registration dashboard. As part of the registration, we provide a redirect URI which is based on the URL above. We also need to add this information to the app config.

    Note: The config (configuration.ts + config.json) has been moved to .env.local for each app.

    3. Deploy Code

    What would happen if we deploy the frontend code and give it a test?

    Exactly! It will fail without a backend. As mentioned in a previous post, all our interactive samples are configured to use a local backend by default. Local backends cannot be used by a deployed app.

    Luckily iModel.js comes with a general-purpose backend, which is a deployed backend anyone can use. Luckier still, it can be turned on by changing a single variable…

    Note: The contents of webresources can now be found under “build” in the root directory.


    We have successfully deployed the app! Now it’s your turn :)

    • Share
    • History
    • More
    • Cancel
    • shunnai.zhao Created by Bentley Colleague shunnai.zhao
    • When: Mon, Sep 14 2020 1:51 AM
    • shunnai.zhao Last revision by Bentley Colleague shunnai.zhao
    • When: Mon, Sep 14 2020 8:17 AM
    • Revisions: 2
    • Comments: 0
    • Sign in to reply
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies