summaryrefslogtreecommitdiff
path: root/lib/index.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-03-31 14:52:57 +0200
committerJules Laplace <julescarbon@gmail.com>2018-03-31 14:52:57 +0200
commita7b2a2c8929ec1d17939f2527ac6033beeaea9b7 (patch)
treec7e94a12caaf14a1d0ce8842f00590b07b381d20 /lib/index.js
parentc3d17983b398b5c5b2c2c62dd8fff478b5f02b4d (diff)
ascii view
Diffstat (limited to 'lib/index.js')
-rw-r--r--lib/index.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/index.js b/lib/index.js
index 6d07dda..a9db423 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -78,6 +78,12 @@ site.init = function(){
})
})
+ app.get("/p/get/randomascii", function(req, res){
+ db.getRandomAscii().then(function(img){
+ res.json(img)
+ })
+ })
+
/* shaderblaster / asciiblaster apis */
app.post("/cgi-bin/im/shader/upload", multer_upload.single('qqfile'), function(req, res){
var now = Math.floor(Date.now() / 1000)
@@ -112,6 +118,7 @@ site.init = function(){
app.get("/p/:id", function(req, res){
res.sendFile("index.html", {root: './public'})
})
+ app.use('/panke/', express.static(path.join(__dirname, '../public')))
app.use('/p/', express.static(path.join(__dirname, '../public')))
}