app.js
646 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();
// seo.sendKeywordsUrls();
app.get('/synchronousKeywords', seo.synchronousKeywords);
app.get('/sendKeywordsUrls', seo.sendKeywordsUrls);
app.get('/sendUrls', seo.sendUrls);
app.listen(config.port, function() {
logger.info(`yoho seo start : ${config.port}`);
});