Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ichengde committed Aug 2, 2019
1 parent b10c253 commit 0dcdbaf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions routes/index.js
Expand Up @@ -2,7 +2,7 @@ var fs = require('fs');
var express = require('express');
var router = express.Router();

const chrome = require('../chrome')
const puppeteer = require('puppeteer')

var crypto = require('crypto')

Expand All @@ -14,7 +14,6 @@ router.get('/', async function (req, res, next) {
}

const toUrl = decodeURIComponent(url + '#/' + method + '?title=' + title + '&data=' + data);
const page = await chrome.getPage()

let shasum = crypto.createHash('sha1');
shasum.update(encodeURIComponent(method + data));
Expand All @@ -36,7 +35,7 @@ router.get('/', async function (req, res, next) {
}


const browser = await puppeteer.launch({ executablePath: "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" })
const browser = await puppeteer.launch({ executablePath: "/usr/bin/google-chrome" })
const page = await browser.newPage();

page.setViewport({
Expand Down

0 comments on commit 0dcdbaf

Please sign in to comment.