Skip to content

Instantly share code, notes, and snippets.

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