Commit 90d11eb5 authored by Fred Chasen's avatar Fred Chasen

Port variable, update paged cli version

parent f4307770
This diff is collapsed.
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
"koa-validate": "1.0.7", "koa-validate": "1.0.7",
"logger": "0.0.1", "logger": "0.0.1",
"node-fetch": "^2.4.1", "node-fetch": "^2.4.1",
"pagedjs": "^0.1.34", "pagedjs-cli": "0.0.5",
"pagedjs-cli": "0.0.3",
"puppeteer": "^1.15.0" "puppeteer": "^1.15.0"
} }
} }
process.env.NODE_ENV = process.env.NODE_ENV || 'development'; process.env.NODE_ENV = process.env.NODE_ENV || 'development';
const PORT = 3000; const PORT = process.env.PORT || 3000;
const Koa = require('koa'); const Koa = require('koa');
const Router = require('koa-router'); const Router = require('koa-router');
...@@ -19,7 +19,7 @@ const printer = require('./printer'); ...@@ -19,7 +19,7 @@ const printer = require('./printer');
const app = new Koa(); const app = new Koa();
const router = new Router(); const router = new Router();
router.post('/printer', printer); router.post('/', printer);
app.use(cors()); app.use(cors());
......
...@@ -6,7 +6,7 @@ module.exports = async (ctx) => { ...@@ -6,7 +6,7 @@ module.exports = async (ctx) => {
ctx.attachment('out.pdf'); ctx.attachment('out.pdf');
const { url, html, options, headers } = ctx.request.body; const { url, html, options, headers } = ctx.request.body;
//
// console.debug('URL: ', url); // console.debug('URL: ', url);
// console.debug('HTML: ', html); // console.debug('HTML: ', html);
// console.debug('OPTIONS: ', options); // console.debug('OPTIONS: ', options);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment