利用谷歌的Firebase虚拟主机来部署Axure的原型页面
Mac电脑为例,前期准备:
npm install -g firebase-tools
npm install -g firebase-tools
firebase login
------------------------------------------
1、通过Axure导出Html静态页面(例如,shuziren文件夹);
------------------------------------------
1、通过Axure导出Html静态页面(例如,shuziren文件夹);
2、通过浏览器在firebase上创建一个名为shuziren的项目;
https://console.firebase.google.com/u/0/
如果失败,多创建几次,网络有时候不稳定或者是谷歌服务器太繁忙!
3、通过cd命令进入导出文件的Html文件夹;
https://console.firebase.google.com/u/0/
如果失败,多创建几次,网络有时候不稳定或者是谷歌服务器太繁忙!
3、通过cd命令进入导出文件的Html文件夹;
4、在(shuziren)文件夹内执行「项目初始化」命令:
firebase init
firebase init
5、依次进行初始化配置:
Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys
光标移至此项处,按空格键使当前项选中;再按回车键!
? What do you want to use as your public directory? (public)
输入: 并按回车键!
输入: 并按回车键!
Configure as a single-page app (rewrite all urls to /index.html)? (Y/n)
输入:n 并按回车键
输入:n 并按回车键
? Set up automatic builds and deploys with GitHub? (Y/n)
输入:n 并按回车键
? File ./index.html already exists. Overwrite? (y/N)
输入:n 并按回车键
当命令行中展示:
输入:n 并按回车键
? File ./index.html already exists. Overwrite? (y/N)
输入:n 并按回车键
当命令行中展示:
✔ Wrote configuration info to firebase.json
✔ Wrote project information to .firebaserc
✔ Firebase initialization complete!
表示当前项目已成功初始化!
6、项目正式部署:
继续保留在当前(shuziren)文件夹内,执行命令:
firebase deploy --only hosting
等待一会儿,当看到类似:
Project Console: https://console.firebase.google.com/project/shuziren-fb632/overview
Hosting URL: https://shuziren-fb632.web.app
文字展示时,则表示项目已成功部署,可以通过Hosting URL来访问该Axure原型项目!
评论
发表评论