This simple Buffalo application shows how you can use the out of the box features of the Buffalo asset pipeline to quickly add Ajax to an application.
- Make sure you have the latest version of Buffalo install and working.
- Make sure your Node and Yarn installations are relatively up to date.
$ go get -u -v github.com/gobuffalo/simple-ajax-recipe
$ cd $GOPATH/github.com/gobuffalo/simple-ajax-recipe
$ buffalo setup
Run the following command to start the Buffalo dev server and then navigate to http://localhost:3000. It might take a second for Node to compile the front end stuff. Sorry about that.
$ buffalo dev
The heart of all this is in the https://github.com/rails/jquery-ujs/wiki plug-in that ships with Buffalo by default.
We recommend you heading over to http://gobuffalo.io and reviewing all of the great documentation there.
Good luck!