@acisel.fr/tweets-sample 中文文档教程
1% of all tweets
Start a project with our library
With nodejs (version > 16.13.0)
的模块在 GitHub 注册表中。 因此,在您的 ${HOME}/.npmrc
文件中指定以下行:
registry=https://registry.npmjs.org/
@acisel-fr:registry=https://npm.pkg.github.com/
然后,您可以将它安装在您的项目文件夹中:
mkdir MYPROJECT
cd MYPROJECT
npm init
npm install @acisel-fr/tweets-sample
创建一个包含此内容的 .env
文件:
TWITTER_BEARER_TOKEN=
并在其上附加您的不记名令牌。 要获取令牌,请访问 Twitter 的开发者门户。
然后,创建一个脚本文件 run.js
:
并运行脚本:
node ./run.js
然后您将看到实时发布的所有推文的 1%。
With Docker
Missing features
- [ ] cli
- [ ] demo
- [ ] docs
- [ ] i18n
- [ ] a11y
- [ ] perf
1% of all tweets
Start a project with our library
With nodejs (version > 16.13.0)
The module is in the GitHub registry. So, specify in your ${HOME}/.npmrc
file the following lines:
registry=https://registry.npmjs.org/
@acisel-fr:registry=https://npm.pkg.github.com/
Then, you can install it in your project folder:
mkdir MYPROJECT
cd MYPROJECT
npm init
npm install @acisel-fr/tweets-sample
Create an .env
file with this content:
TWITTER_BEARER_TOKEN=
And append to it your bearer token. To obtain a token, visit the developper portal of Twitter.
Afterwards, create a script file run.js
:
And run the script:
node ./run.js
You will see then 1% of all the tweets emitted in real time.
With Docker
Missing features
- [ ] cli
- [ ] demo
- [ ] docs
- [ ] i18n
- [ ] a11y
- [ ] perf