2

我可以仅通过托管来部署文件,它工作正常,但我尝试使用它说的 firebase 功能:

Welcome
Firebase Hosting Setup Complete
You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary!

OPEN HOSTING DOCUMENTATION

我的index.js代码在这里:-

const functions = require('firebase-functions');

    // // Create and Deploy Your First Cloud Functions
    // // https://firebase.google.com/docs/functions/write-firebase-functions
    //
     exports.helloWorld = functions.https.onRequest((request, response) => {
      response.send("Hello from Firebase!");
     });

链接到我的项目:-

https://influence-cbc3f.firebaseapp.com/
4

2 回答 2

2

如果要部署功能,请使用以下命令:

firebase deploy --only functions

更多信息在这里:

https://firebase.google.com/docs/functions/get-started

于 2018-03-15T12:43:30.120 回答
0

如果您使用的是 Angular 6,而不是在以下步骤中提供“ dist ”:

? 你想用什么作为公共目录

您需要提供“<strong>dist/your_application_name”</p>

查看这篇出色的文章 https://medium.com/@longboardcreator/deploying-angular-6-applications-to-firebase-hosting-b5dacde9c772

于 2018-09-05T09:14:32.430 回答