LINE Bot template generator for yeoman
This repository contains generator of LINE Bot for yeoman. To use the package, install yeoman and the generator.
npm install -g yo
npm install -g generator-line-bot
This is optimized for Visual Studio Code, I strongly recommend using Visual Studio Code as editor. You can install it from Visual Studio Code download.
How to use
- To generate the application as "MyBot" with C# :
yo line-bot MyBot --csharp
- It also supports other languages. Change the last option
-
It will ask you for ChannelSecret and Token. Pass the correct values.
-
Open the generated folder via VSCode and you are good to go.
-
Visual Studio Code will let you know which extension you should install. Follow the instruction and install them as needed.
-
Simply press F5 will start debug the application.
Other things you need to know
C#
- make sure you install C# extension
- it is Azure Function v2 application and default port is 7071.
- make sure you install dotnet core 2
- make sure you install azure function tools for dotnetcore. For further information, see here
golang
- make sure you installed golang
- make sure you install Go extension.
- make sure you configured PATH to go command.
- by default, it uses port 8000 when you debug locally. See .vscode/launch.json for detail.
python
- makre sure you installed python
- make sure you install Python extension
- make sure you configured PATH to python and pip command.
- by default, it uses port 8000 when you debug locally. see app.py for more detail.
arg_parser.add_argument('-p', '--port', default=8000, help='port')
Other resources
I will write detail step by step blog later.