nicholasbs / hsnews Goto Github PK
View Code? Open in Web Editor NEWA Hacker News clone in Clojure
A Hacker News clone in Clojure
the URL that causes the error: http://localhost:3000/sessions/create
java.lang.IllegalArgumentException: Host URL cannot be nil
at clj_http.client$post.doInvoke(client.clj:442)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at hsnews.models.user$login_BANG_.invoke(user.clj:82)
at hsnews.views.user$POST__sessions__create.invoke(user.clj:65)
at hsnews.views.user$eval3999$fn__4000.invoke(user.clj:63)
at compojure.core$if_route$fn__1135.invoke(core.clj:39)
at compojure.core$if_method$fn__1128.invoke(core.clj:24)
at compojure.core$routing$fn__1154.invoke(core.clj:98)
at clojure.core$some.invoke(core.clj:2388)
at compojure.core$routing.doInvoke(core.clj:98)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.core$apply.invoke(core.clj:602)
at compojure.core$routes$fn__1158.invoke(core.clj:103)
at noir.request$wrap_request_map$fn__1967.invoke(request.clj:14)
at ring.middleware.keyword_params$wrap_keyword_params$fn__1290.invoke(keyword_params.clj:21)
at ring.middleware.nested_params$wrap_nested_params$fn__1332.invoke(nested_params.clj:64)
at ring.middleware.params$wrap_params$fn__1262.invoke(params.clj:76)
at ring.middleware.multipart_params$wrap_multipart_params$fn__1370.invoke(multipart_params.clj:102)
at ring.middleware.session$wrap_session$fn__1555.invoke(session.clj:40)
at ring.middleware.cookies$wrap_cookies$fn__1467.invoke(cookies.clj:132)
at noir.server.handler$wrap_base_url$fn__2031.invoke(handler.clj:38)
at noir.session$noir_session$fn__1986.invoke(session.clj:58)
at ring.middleware.session$wrap_session$fn__1555.invoke(session.clj:40)
at ring.middleware.cookies$wrap_cookies$fn__1467.invoke(cookies.clj:132)
at noir.cookies$noir_cookies$fn__1892.invoke(cookies.clj:66)
at ring.middleware.cookies$wrap_cookies$fn__1467.invoke(cookies.clj:132)
at noir.validation$wrap_noir_validation$fn__2018.invoke(validation.clj:88)
at noir.statuses$wrap_status_pages$fn__1924.invoke(statuses.clj:23)
at noir.server.handler$wrap_url_decode$fn__2027.invoke(handler.clj:27)
at noir.exception$wrap_exceptions$fn__1955.invoke(exception.clj:59)
at noir.options$wrap_options$fn__1913.invoke(options.clj:34)
at clojure.lang.Var.invoke(Var.java:401)
at ring.middleware.stacktrace$wrap_stacktrace_log$fn__576.invoke(stacktrace.clj:15)
at ring.middleware.stacktrace$wrap_stacktrace_web$fn__608.invoke(stacktrace.clj:79)
at ring.middleware.reload$wrap_reload$fn__749.invoke(reload.clj:18)
at ring.adapter.jetty$proxy_handler$fn__87.invoke(jetty.clj:16)
at ring.adapter.jetty.proxy$org.mortbay.jetty.handler.AbstractHandler$0.handle(Unknown Source)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
I've already got some fun ideas for things to do with the API, and I imagine others do as well.
This might be two feature requests, but I don't want to open that many issues at once.
It would be great if you could edit Post titles/URLs and Comment text.
Something like:
username | time elapsed | link | parent | story_name
akin to HN's /newcomments view: http://news.ycombinator.com/newcomments
Comments should be nested, like hacker news.
I created a post with the link www.weathernao.com (my new super cool and simplistic weather app!), but the link generated by HSN is http://news.hackerschool.com/www.weathernao.com (which leads to a 404 page).
I think this could go either way, but it might be nice to do some basic validation on urls or automatically add "http://" or at least warn users when they are about to submit a relative link (if you think that will be a common thing).
I want j
and k
to move between stories on the front page and return
to view it.
Self posts are one of the best features of HN.
Looks like it is loading super slowly, on a heroku instance that needs to spin up or what?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.