Simple starter web app: Vue.js frontend, webpack 4 config, vue-styled- components with mirage.js for a mock API to develop against.
"Mirage JS is an API mocking library that lets you build, test and share a complete working JavaScript application without having to rely on any backend services."
Like Vue? Wanna prototype some kinda web app thingy? This is a good starting place. I've also included my preferred webpack config as opposed to VUE-CLI, cause chances are you may want to add or modify your build steps. And threw in the vue port of Styled Components - CAUSE STYLED COMPONENTS IS THA BEST - for styling!
- Install Depenedencies
yarn
- Develop
yarn dev
You Can define your endpoints, schemas etc in: src/server.js
// GET Request
this.get('/todos', schema => {
return schema.todos.all()
})
// POST Request
this.post('/todos', (schema, request) => {
let todo_item = JSON.parse(request.requestBody).todo_item
return schema.todos.create({ todo_item })
})
👩💻 HAVE FUN 👨🏽💻