Skip to content

Instantly share code, notes, and snippets.

@borkdude
Forked from jackrusher/deploy.sh
Created Mar 18, 2022
Embed
What would you like to do?
Writing and deploying Google Cloud Functions in Clojure using NBB
# command line to deploy the project
gcloud functions deploy hello --runtime nodejs14 --trigger-http
(ns hello)
(defn hello [req res]
(js/console.log req)
(.send res "hello world"))
#js {:hello hello}
import { loadFile } from 'nbb';
const { hello } = await loadFile('./hello.cljs');
export { hello }
{
"type": "module",
"scripts": {
"start": "functions-framework --target=hello"
},
"main": "index.mjs",
"dependencies": {
"nbb": "0.1.1",
"@google-cloud/functions-framework": "~1.9.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment