Skip to content

Commit 35d20cf

Browse files
committed
prep for AsyncSocketChannel
1 parent 0f30049 commit 35d20cf

File tree

6 files changed

+31
-3
lines changed

6 files changed

+31
-3
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pom.xml.asc
1616
.secrets
1717
.pcp
1818
/tmp
19-
examples
2019
/.DS_Store
2120
**/DS_Store
2221
.DS_Store

examples/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Examples use cases
2+
This is still a work in progress
3+
4+
- [Differentiating between GET and POST](./)
5+
- [Uploading files](./)
6+
- [Connecting to Postgres](./)
7+
- [JWT authentication](./)
8+
9+
10+
Happy hunting.
11+
12+
<img src="https://raw.githubusercontent.com/alekcz/pcp/master/assets/logo/logo-alt.svg" width="40px">

examples/pcp.edn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{:project "examples"}

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject pcp "0.0.2-beta.3"
1+
(defproject pcp "0.0.2-beta.4"
22
:description "PCP: Clojure Processor - A Clojure replacement for PHP"
33
:url "https://github.com/alekcz/pcp"
44
:license {:name "The MIT License"

resources/PCP_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.0.2-beta.3
1+
v0.0.2-beta.4

src/pcp/utility.clj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[clojure.java.shell :as shell]
99
[org.httpkit.server :as server]
1010
[taoensso.nippy :as nippy]
11+
;; [clojure.tools.cli :refer [parse-opts]]
1112
[environ.core :refer [env]])
1213
(:import [java.net Socket]
1314
[java.io File ByteArrayOutputStream InputStream BufferedWriter]
@@ -258,6 +259,21 @@ Options:
258259
(slurp (str (template-path) "/api/info.clj")))
259260
(println (str "Created pcp project `" project-name "` in directory") (.getAbsolutePath ^File (io/file path)))))
260261

262+
;; (def cli-options
263+
;; ;; An option with a required argument
264+
;; [["-s" "--serve PATH" "Server root"
265+
;; :default "./public"
266+
;; :parse-fn #(Integer/parseInt %)
267+
;; :validate [#(< 0 % 0x10000) "Must be a number between 0 and 65536"]]
268+
;; ["-t" nil "SCGI server port"
269+
;; :default 9000
270+
;; :validate [#(< 0 % 0x10000) "Must be a number between 0 and 65536"]]
271+
;; ["-v" "--version"]
272+
;; ["-h" "--help"]])
273+
274+
;; (defn -main [& args]
275+
;; (println (parse-opts args cli-options)))
276+
261277
(defn -main
262278
([]
263279
(-main "" ""))

0 commit comments

Comments
 (0)