app.js 583 Bytes
'use strict';

const express = require('express');
const config = require('./config/config');
const yohoLib = require('yoho-node-lib');

// 全局注册library
yohoLib.global(config);
global.yoho.redis = require('./libs/redis');
const logger = global.yoho.logger;
const app = express();
const seo = require('./apps/seo');

// 定时任务 主动推送和生成xml
seo.start();

app.get('/synchronousKeywords', seo.synchronousKeywords);
app.get('/sendKeywordsUrls', seo.sendKeywordsUrls);

app.listen(config.port, function() {
    logger.info(`yoho seo start : ${config.port}`);
});