HTTP errors with Element UI and Axios.

Sometimes I want to find an easy way to handle HTTP errors. Using Axios interceptors, we handle requests and responses before the then or catch. I will create a Vue EventBus instance to communicate my interceptor with the app and emit an event when some error happened. const EventBus = new Vue(); axios.interceptors.response.use( function(response) {…

Create your REST API with Express (3/3)

You are reading the third part of Create Rest API with Express, feel free to read Part 1 and Part 2 In this part, I will send a request to the POST method using Vue. Add form to send data. The first step is to include the CDN to index.html for a little styling. The HTML contains a…

Create your REST API with Express 1/2

You are reading the second part of Create Rest API with Express, feel free to read the Part 1 for continue, in this case, I will build a simple client with Vue for getting the list of documents from our API. Create my app with Vue. The only goal of this application is to get the answer…

Create your REST API with Express part 1

Today I wanted to create my own REST API using express, some friends told me about Express is allow create stateless APIS quick and easy and support HTTP verbs to able communicate with our resources getting the responses in JSON format. Prerequisites This is what you’re going to need in order to follow along with this example:…