Giter VIP home page Giter VIP logo

node_crawler's Introduction

NodeCrawler

Node.js 项目,管理一些爬虫小程序

1、git clone

2、npm install

3、npm test(启动一个热重载的应用)

4、npm start

效果

免费 VPN L2TP/IPsec 方式

dingtalk.png

v2ray 、ssr 、ss 节点分享

free-ss.png

free-ssr.png

交流学习钉钉群号: 31971273

本项目仅供交流学习使用,请准守国家相关法律法规!更新的科学上网主机勿用于违法犯罪等活动!!违反者后果自负!!!

科学上网配置教程

将项目部署到 openshift 上面

  • 简单的部署直接浏览 catalog 选择相应的语言,next 的之后填写应用名称和项目地址就可以了
  • 部署私有项目前两步同上,接着选择 advanced options 选项填写应用名称和项目地址,创建一个 New Secret(这个可以选择两种方式:密钥或者账户名加密码

设置开发环境

  • 在 package.json 里设置对应的运行命令 export NODE_ENV='development'

启用服务端 gzip

  • 安装并使用 koa-compress 插件

关于 heroku 的部署

  • 安装 heroku 客户端
  • heroku login
  • 在已有项目的根目录执行 herku create(发现创建了一个随机 app,不想要)
  • git remote -v 查看当前项目有几个远程源地址
  • git remote rm heroku 删除 heroku 源
  • 载创建自己想要的应用名称,herku create [appname],生成应用的 heroku git 地址
  • 手动将这个源地址关联到项目上去 git remote add [源名称][源地址]
  • 将项目推送到 heroku 源中,项目会自动部署

解决 puppeteer 库无法在 heroku 中正常启动的问题

 $ heroku buildpacks:add jontewks/puppeteer
  • Or use the source code in this repository:
  $ heroku buildpacks:add https://github.com/jontewks/puppeteer-heroku-buildpack.git
const browser = await puppeteer.launch({
  args: ['--no-sandbox', '--disable-setuid-sandbox'],
})

将项目部署到 gearhost(免费的小程序托管云平台)

  • gearhost 里面创建一个项目
  • github 上面创建一个项目
  • gitclone 到本地
  • 将 gearhost 里面的 LocalGit Deployments 的项目地址添加的 git 中
  • git remote add websites https://${你的项目名称}.scm.gear.host/${你的项目名称}.git
  • 接下来就可以往 gearhost 的地址源里 push 你的代码了
  • 在 gearhost 的项目面板里面设置 node 的版本号
  • 不要指定 app 的端口,优先使用 process.env.PORT

设置开发环境

  • 在 package.json 里设置对应的运行命令 export NODE_ENV='development'

node_crawler's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.