Coder Social home page Coder Social logo

alphatr-stat's Introduction

简介

alphatr-stat 是一个使用 ThinkJS 搭建的 Google Analytics 服务端调用服务;

具体参照我博客的文章:服务端使用 Google Analytics

怎么使用

1. 克隆项目代码

git clone https://github.com/AlphaTr/alphatr-stat

2. 安装依赖

进入到项目目录 alphatr-stat 中,使用 npm 安装依赖(推荐使用 npm.taobao.org 安装源来安装)

npm install

3. 建立软链

开发环境下,在 www 目录下建立指向 develop.jsindex.js 链接,线上环境建立指向 online.js 的链接

ln -s develop.js index.js

4. 修改 nginx 配置并添加到 nginx 配置文件中

修改 config 目录下 develop.confonline.conf 文件中的域名信息,并根据不同的环境将 nginx 配置文件 include 到 nginx 的主配置文件中,重启 nginx 使配置文件生效;

5. 启动 node 服务

在项目目录下执行 node www/index.js 启动服务,线上环境建议使用 pm2 来进行管理,在项目目录下执行 pm2 start ./pm2.json 调用 pm2 启动服务。

alphatr-stat's People

Contributors

alphatr avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

treerachai

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.