使用googleapis与火力地堡云功能,能在这个摹套房域中所有用户的列表。
如何实例化 Admin SDK Directory 服务对象。我没有看到 NodeJS 示例,也不清楚如何使用googleapis.
此代码从 Firebase Cloud Functions 运行,并且似乎可以通过身份验证。现在,如何//TODO在以下代码中设置服务对象:
// Firebase Admin SDK
const functions = require('firebase-functions')
const admin = require('firebase-admin')
admin.initializeApp(functions.config().firebase)
// Google APIs
const googleapis = require('googleapis')
const drive = googleapis.drive('v3')
const gsuiteAdmin = googleapis.admin('directory_v1')
// Service Account Key - JSON
let privatekey = require("./privatekey.json")
let jwtClient = new googleapis.auth.JWT(
privatekey.client_email,
null,
privatekey.private_key,
['https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/admin.directory.user'])
// Firebase Cloud Functions - REST
exports.authorize = …Run Code Online (Sandbox Code Playgroud) node.js jwt service-accounts google-admin-sdk google-cloud-functions
Dockerfile我的或有什么问题bitbucket-pipelines.yml吗?为什么 bitbucket pipeline 环境中缺少模块?
当我尝试npm run build使用 Bitbucket Pipelines 通过 webpack 处理我的 Vue2 项目时,我收到有关缺少模块的错误。
来自日志
npm run build
> people-is@1.0.0 build /opt/atlassian/pipelines/agent/build
> node build/build.js
module.js:549
throw err;
^
Error: Cannot find module 'cli-spinners'
Run Code Online (Sandbox Code Playgroud)
这是配置文件。
Dockerfile -构建 cportwine/people-is
FROM node:8.10.0
RUN npm install
RUN npm install -g firebase-tools
CMD [ "npm", "run", "build" ]
Run Code Online (Sandbox Code Playgroud)
bitbucket-pipelines.yml
image:
name: cportwine/people-is
pipelines:
default:
- step:
script:
- npm run build
Run Code Online (Sandbox Code Playgroud)
包.json
{
"name": "people-is", …Run Code Online (Sandbox Code Playgroud) 我希望看到chrome中的vue-cli欢迎页面,从我Mac上的Docker Container运行.我正在努力为此设置正确的配置.我错过了什么?这是我尝试过的.
安装
命令行
$ vue init webpack docvue$ cd docvue$ npm install档
运行上面的命令后,我现在准备好使用webpack构建vue示例项目.
$ ls
README.md config node_modules package.json static
build index.html package-lock.json src
Run Code Online (Sandbox Code Playgroud)
在/docvue/我可以npm run dev,我看到:
> docvue@1.0.0 dev /Users/dchaddportwine/Startup/docvue
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
95% emitting
DONE Compiled successfully in 4695ms 12:17:04 PM
Your application is running here: http://localhost:8080
Run Code Online (Sandbox Code Playgroud)
在Chrome中,http://localhost:8080/#/我看到了Vue Welcome页面.
构建Docker镜像
现在是时候使用这个Dockerfile构建Docker镜像了:
# base image
FROM node:8.10.0-alpine …Run Code Online (Sandbox Code Playgroud) 如何在不删除云功能的情况下部署Firebase网站.
firebase deploy --only site或类似的我有一个使用云功能的Firebase项目.代码位于两个文件夹中:
-site-code
-cloud_function-code
Run Code Online (Sandbox Code Playgroud)
当我想部署项目时,我使用firebase CLI工具,分两步:
步骤1
从-site-code我跑:
firebase deploy
Run Code Online (Sandbox Code Playgroud)
第2步
然后从cloud_functions-code我运行:
firebase deploy --only functions
Run Code Online (Sandbox Code Playgroud)
当我运行firebase deploy 从 -site-code我的火力地堡云功能都被删除了,所以我必须跟进firebase deploy --only functions 的 -cloud_functions-code.
我没有找到--only仅部署站点代码的指令-site-code
使用@slack/interactive-message包firebase-functions来监听和响应Slack消息和对话框.
我不确定如何使用@slack/interactive-messagefirebase 的监听器.
1)我是否使用Firebase functions.https.onRequest(),并以某种方式req从Slack 传递到 slackInteractions.action()?
要么
2)我使用的app.use("/app", slackInteractions.expressMiddleware());如果是这样,你在哪里slackInteractions.action()小号去?
要么
3)还有别的吗?
// Express
import express = require("express");
const app = express();
const cors = require("cors")({
origin: "*"
});
app.use("*", cors);
// Firebase Functions SDK
import functions = require("firebase-functions");
const slackbotConfig = functions.config().slackbot;
const { createMessageAdapter } = require("@slack/interactive-messages");
const slackInteractions = createMessageAdapter(slackbotConfig.signing_secret);
app.use("/app", slackInteractions.expressMiddleware());
// Express route
app.post("/go", (req, …Run Code Online (Sandbox Code Playgroud) middleware express firebase slack-api google-cloud-functions