telegram link - Macbaren bot
Develop chatbots with zero configuration using javascript. If you want to use typescript use ts starter.
npx create-urban-bot my-app --template js
- Get telegram token
- Paste token to
.env
TELEGRAM_TOKEN=YOUR_TOKEN
- Uncomment
// import './render/telegram';
insidesrc/index.ts
- Run
npm run dev
and check your bot
- Create slack app
- Paste token to
.env
SLACK_TOKEN=YOUR_TOKEN
- Paste signing secret to
.env
SLACK_SIGNING_SECRET=YOUR_SIGNING_SECRET
- Run
npm run start-tunnel
and connect the public url with slack webhook. - Uncomment
// import './render/slack';
insidesrc/index.ts
- Run
npm run dev
and check your bot
- Create facebook app
- Paste credentials to
.env
- Run
npm run start-tunnel
and connect the public url with facebook webhook. - Uncomment
// import './render/facebook';
insidesrc/index.ts
- Run
npm run dev
and check your bot
Build your code to dist
folder.
Build and start your code after every code changes. Settings are inside package.json
nodemonConfig
.
Check code style. All rules are inside .eslintrc.js
.
Fix code style issues automatically including prettier
formatting.
Start code from dist
folder.
Start a public URL for exposing your local server.
Start your tests. File matching *.test.(js|jsx)
.
You could import any file and paste to components as buffer or stream. It will be automatically added to dist bundle.
import image from './assets/logo.png';
import doc from './assets/document.doc';
function App() {
return (
<>
<Image file={fs.createReadStream(image)} />
<File file={fs.readFileSync(doc)} />
</>
);
}