This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-15
Channels
- # bangalore-clj (4)
- # beginners (53)
- # boot (7)
- # cider (1)
- # clara (1)
- # cljs-dev (13)
- # clojure (29)
- # clojure-dusseldorf (3)
- # clojure-russia (7)
- # clojure-spec (63)
- # clojure-uk (7)
- # clojurescript (51)
- # css (1)
- # datomic (5)
- # emacs (1)
- # events (1)
- # fulcro (15)
- # hoplon (3)
- # immutant (3)
- # juxt (1)
- # midje (2)
- # off-topic (24)
- # om (1)
- # parinfer (1)
- # portkey (54)
- # re-frame (4)
- # reagent (13)
- # schema (1)
- # shadow-cljs (19)
- # sql (1)
- # testing (37)
- # yada (2)
1) set up an aws account
I am in the train today but I’ll send you examples at the end of the day
Dont Forget to add few € for your lambda
Then, just try the hello word example
defn a hello-word that send back the string
I guess I was hoping to see a "Lambda/Portkey cookbook" -- and see if I can turn my entire server side serverless.
And mount it
I can already drop websocket needs -- so in theory, lambda + Aurora + Dynamo + S3 should be all I need.
Also, want to hear the most badass first sentence intro to a book? (technically part of the 'Foreword'):
It will package everything needed to make it run on a lambda, you can also access it with the api-gateway url that the function returns
Lol, go on!
Alright, I guess your suggestion is: 1. get the most basic hedllo world working 2. start porting app over 3. if something breaks, ask for help ?
Quote: Foreword: Page xv (first real sentence of the book) At some point in the next few years we're going to see the first billion-dollar startup with a single employee, the founder, and taht engineer will be using serverless technology. -- after that sentence, this became the first book where I read the foreword, preface, acknowledgement, and 'about this book' in great detail
Yes, get the hello world working, define what you want to do with your lambda, and really don’t hesitate to ping
@baptiste-from-paris: I have the following problem 1. I did lein install 2. I added "portkey-0.1.0-SNAPSHOT" to my boot.build 3. I can require portkey.ouroboros, but I can't require portkey.core (ns server.snip.aws (:require [portkey.ouroboros] #_ [portkey.core :as pk])) 4. When I try to require portkey.core, I get an error of:
2. Unhandled clojure.lang.Compiler$CompilerException
Error compiling portkey/core.clj at (1:1)
1. Caused by java.lang.Exception
namespace 'portkey.ouroboros' not found
You don’t need to require ouroboros
If you try only portkey core?
yeah, it gives me the exact same error (which is way I tried to see if I could require portkey.ouroboros on my own)
(ns server.snip.aws
(:require [portkey.core :as pk]))
results in error:
1. Caused by java.lang.Exception
namespace 'portkey.ouroboros' not found
It shouldn’t change anything but can you try from a lein template ?
is there a way I can run directly from the github repo I cloned of portkey? I get that you want to test boot vs lein, but I happen to know little lein.
I think you could as long as ouriboros eat itself, but it will be only in the repl
but I don't know how to setup a lein template, so I'm asking if there is som existing repo I can clone
Lein new app-name
Minimal template
Then in project.clj your dependencies
And that’s it
user=> (require 'portkey.core)
Preparing for self instrumentation.
Ouroboros succesfully eating its own tail!
Instrumenting clojure.lang.Var... done!
CompilerException java.io.FileNotFoundException: Could not locate clojure/spec/alpha__init.class or clojure/spec/alpha.clj on classpath., compiling:(portkey/aws.clj:1:1)
Try with clojure 1.9.
In your project template
Lein clean
Lein deps
should I change this liunein project.clj too? :dependencies [[org.clojure/clojure "1.8.0"]
That’s what I was trying to say ^_^
user=> (require 'portkey.core)
Preparing for self instrumentation.
Ouroboros succesfully eating its own tail!
Instrumenting clojure.lang.Var... done!
WARNING: get-method already refers to: #'clojure.core/get-method in namespace: portkey.aws.apigateway, being replaced by: #'portkey.aws.apigateway/get-method
nil
trying from boot repl:
(require 'portkey.core)
java.lang.Exception: namespace 'portkey.ouroboros' not found
clojure.lang.Compiler$CompilerException: java.lang.Exception: namespace 'portkey.ouroboros' not found, compiling:(portkey/core.clj:1:1)
Yes, it should be good
=== this makes no sense ===
boot.user> (require 'portkey.ouroboros)
nil
boot.user> (require 'portkey.core)
java.lang.Exception: namespace 'portkey.ouroboros' not found
clojure.lang.Compiler$CompilerException: java.lang.Exception: namespace 'portkey.ouroboros' not found, compiling:(portkey/core.clj:1:1)
boot.user>
if I reuiqre portkey.ouroboros manually, it works fine, but if I require portkey.core, there's an error loading portkey.ouroborosIt creates an agent that is attached to the current running VM in order to do some instrumentation of bytecode
Have you got the hello world running with lein ?
I remember that we have an issue for getting started https://github.com/portkey-cloud/portkey/issues/30