newbotjs / newbot-framework

Framework to create chatbots on all platforms and on the browser - https://newbot.io
40 stars 5 forks source link

Testing Deploy on the browser #16

Closed IzydorDPS closed 4 years ago

IzydorDPS commented 4 years ago

Hi, when i was following by documentation "Deploy on the browser", there is a problem with CORS.

"Fetch API cannot load file:///C:/filetpath/model.npl. URL scheme must be "http" or "https" for CORS request."

I solved this by using XAMPP as a host , but couldn't it work out of the box?

RSamaium commented 4 years ago

Hello,

Indeed, a request is made on the client to retrieve the NLP model. To make this type of request, oblige to pass on an HTTP server

You can put a simple server to start reading the HTML page:

https://www.npmjs.com/package/serve