Skip to content

About

其乐社区新帖telegram推送

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Configuration

@module config/bot.config

export default registerAs('bot', () => ({
    TOKEN: '', // 填写自己的telegram bot token
    USERNAME: '', // 填写自己的telegram bot name
    CHANNEL: '' // 填写自己的telegram channel id
}));

@module config/keylol.config

export default registerAs("keylol", () => ({
    COOKIES: {
        cookie_pre: "dz_2132_", // COOKIE前缀 查询填写
        saltkey: "", // COOKIE 查询填写
        auth: "", // COOKIE 查询填写
    },
    HOST_URL: "https://keylol.com",
    KEY_WORDS: ["steam"] // 自己想筛选的关键字
}));

@module config/orm.config

const OrmConfig: Options = {
    driver: MySqlDriver,
    host: "127.0.0.1", // 数据库地址
    port: 3306,
    user: "", // 数据库用户名
    password: "", // 数据库密码
    dbName: "", // 数据库名
    entities: [KeylolChannel, KeylolEpisode],
    allowGlobalContext: true,
    debug: false,
    logger: logger.debug.bind(logger)
};

Running the app

# development
$ npm run start

updateChannels()函数第一次需运行,之后可注释掉,注意获取社区帖子板块用

async onModuleInit()
{
    await this.updateChannels(); //第一次需运行,之后不用可注释掉
}
pm2 start /自定义路径/nest-keylol/dist/src/main.js --name keylol --cron "*/5 * * * *"

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

License

Nest is MIT licensed.

About

其乐社区新帖telegram推送

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages