Fork me on GitHub
#biff
<
2022-12-06
>
Anssi Kittilä10:12:27

https://biffweb.com/docs/tutorial/new-project/ trying to go through this with windows. What am I supposed to put into the config.edn file?

Jacob O'Bryant17:12:57

it should be auto-generated when you create the project. no need to change anything, at least not in that section.

Jacob O'Bryant19:12:28

Just noticed "with windows." My primary recommendation would be to use WSL2 and run the new project script normally. I use Windows + WSL2 myself, but I haven't yet gotten around to making sure everything works smoothly on plain Windows. However if you want to give it a go, you can run this command directly instead of the bash <(curl -s ) command:

clj -Sdeps '{:deps {github-jacobobryant/biff-new-project {:git/url "" :sha "6353c406adef0344484b49a5ef2282eab77c2347" :deps/root "new-project"}}}' -M -m com.biffweb.new-project
Or--to just answer the question you asked--you can clone the eelchat repo and use this for config.edn:
{:prod {:biff.xtdb/dir "storage/xtdb"
        :biff.xtdb/topology :standalone
        ;; Standalone topology in production isn't recommended for anything
        ;; serious. You can uncomment the following to use managed postgres
        ;; instead.
        ;; :biff.xtdb/topology :jdbc
        ;; :biff.xtdb.jdbc/jdbcUrl ":port/dbname?sslmode=require"
        :biff/base-url ""
        ;; Postmark is used to send email sign-in links. Create an account at
        ;; 
        :postmark/api-key nil
        ;; Change to the address of your sending identity. Set a reply-to
        ;; address on your sending identity if you want to receive replies and
        ;; your from address isn't configured for receiving.
        :postmark/from ""
        ;; Recaptcha is used to protect your sign-in page. Go to
        ;;  and add a site. Select v2
        ;; invisible. Add localhost to your list of allowed domains.
        :recaptcha/site-key nil
        :recaptcha/secret-key nil
        :biff.middleware/cookie-secret nil
        :biff/jwt-secret nil}
 :dev {:merge [:prod]
       :com.eelchat/enable-beholder true
       :biff/host "0.0.0.0"
       :biff/port 8080
       :biff/base-url ""
       :biff.xtdb/topology :standalone
       :biff.middleware/secure false}
 :tasks {;; Set this if the auto-detection doesn't work
         ;; Possible values: macos-x64, macos-arm64, linux-x64, linux-arm64
         :biff.tasks/tailwind-build nil
         :biff.tasks/main-ns com.eelchat
         :biff.tasks/soft-deploy-fn com.eelchat/on-save
         :biff.tasks/deploy-from "master"
         :biff.tasks/deploy-to "prod"
         :biff.tasks/server ""}}

👏 1
Anssi Kittilä03:12:15

Thanks a lot! I'll either do it with my work Mac or try the above things.

👌 1
Lyn Headley14:12:22

I'm using windows and wsl2 happily

Jacob O'Bryant05:12:52

I updated the install script etc to work on Windows. You can create a new project like so:

Invoke-WebRequest -OutFile new-project.clj -Uri 
bb new-project.clj
(Let me know if you know how to turn that into a one-liner, like bb -e "$(curl -s )" on linux/mac... I'm not exactly a powershell expert!) I'd still recommend wsl2 (see the https://biffweb.com/docs/get-started/new-project/#windows), but plain windows should work fine. And let me know if it doesn't--I tested things briefly but not in-depth.

1
Anssi Kittilä08:12:47

Amazing, ill give it a go tomorrow!

👌 1