Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Todo - Kites Extensions/Templates #1

Open
7 of 14 tasks
vunb opened this issue Jan 6, 2018 · 3 comments
Open
7 of 14 tasks

Todo - Kites Extensions/Templates #1

vunb opened this issue Jan 6, 2018 · 3 comments

Comments

@vunb
Copy link
Member

vunb commented Jan 6, 2018

Wanted the list of cli tools:

  • mvc: Assembling all into complete ship (default), document
  • basic: Template for building from scratch
  • apidoc: Template for API Documentation, nodevn/kites-apidoc
  • express: Template for Express Application
  • restful: Template for generating a RESTful API Server
  • spa: Template for generating a Single Page Application (kites/spa)
  • cms: Template for generating a Content Management System (CMS)
  • chat: Template for generating a Chat application
  • chatbot: Template for generating an AI Chatbot application, vntk/chatbot, document
  • videocall: Template for generating a Video Call application
  • electron: Template for creating a desktop application with native_modules
  • gateway: Template for creating a microservices API Gateway
  • oauth|oauth2: Template for creating an OAuth2 Server
  • crawler: Template for crawl news, products, ...

Syntax:

kites init [my_app_name] --template chatbot

Example:

kites init my_kute_chatbot --template chatbot

Then a new project will be generated at the current directory.

@vunb
Copy link
Member Author

vunb commented Apr 13, 2018

It's better if we have a general command called init:

For shortkey:

kites init [my-app-name] -t [template] -d [directory]

Or:

kites init [my-app-name] --template [template] --directory [directory]

Params:

  • t | template: application template (default: mvc)
  • d | directory: the directory will contain the genered project (default: current working directory)

Note: The name of template is corresponding to a branch of vunb/kites which it will be downloaded to the current working directory.

@vunb
Copy link
Member Author

vunb commented Apr 13, 2018

Now we have done to create a chatbot easily with Nodejs by:

Using only NPM:

  1. Install kites cli: npm install @kites/cli
  2. Create a chatbot: kites init my-chatbot --template chatbot
  3. Install dependency: npm install
  4. Configure and restore database then run: npm start
  5. Browser and navigate to: http://localhost:3000

Using NPM with docker compose:

  1. Install kites cli: npm install @kites/cli
  2. Create a chatbot: kites init my-chatbot --template chatbot
  3. Build docker: docker-compose build
  4. Run daemon: docker-compose up -d
  5. Restore database by connect to mongdb container: docker exec -it mongodb bash
  6. Browser and navigate to: http://localhost:3000

More detail: https://github.com/vntk/vntk-chatbot-framework

Make sure you have installed Node.js and Mongodb.

@vunb vunb changed the title Kites cli Todo - Kites Templates Jul 21, 2018
@vunb
Copy link
Member Author

vunb commented Apr 21, 2019

Example for use: SPA Template

// Every http GET request: `ip:port/myapp*` will be routed to static with folder name `myapp`.
// `kites.config.json` with option: `discover: false`
await kites().use(spa('myapp')).init()

// Or
// Every http GET request: `ip:port/myapp*` will be routed to static with folder name `public`.
await kites().use(spa('myapp', './public')).init()

@vunb vunb pinned this issue May 2, 2019
@vunb vunb changed the title Todo - Kites Templates Todo - Kites Extensions/Templates Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant