├── .gitignore ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── assets │ └── logo.png ├── components │ ├── AddTutorial.vue │ ├── Tutorial.vue │ └── TutorialsList.vue ├── http-common.js ├── main.js ├── router.js └── services │ └── TutorialDataService.js ├── vue-3-crud-example-axios-tutorial.png └── vue.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue 3 example with Axios & Vue Router: Build CRUD App 2 | Build a Vue.js 3 CRUD example to consume REST APIs, display and modify data using Axios and Vue Router. 3 | - Each Tutorial has id, title, description, published status. 4 | - We can create, retrieve, update, delete Tutorials. 5 | - There is a Search bar for finding Tutorials by title. 6 | 7 |  8 | 9 | For instruction, please visit: 10 | > [Vue 3 CRUD example with Axios & Vue Router](https://bezkoder.com/vue-3-crud/) 11 | 12 | Typescript version: 13 | > [Vue 3 Typescript example with Axios: Build CRUD App](https://bezkoder.com/vue-3-typescript-axios/) 14 | 15 | More Practice: 16 | > [Vue 2 CRUD App with Vue Router & Axios](https://bezkoder.com/vue-js-crud-app/) 17 | 18 | > [Vue Pagination with Axios and API example](https://bezkoder.com/vue-pagination-axios/) 19 | 20 | > [Vue.js JWT Authentication with Vuex and Vue Router](https://bezkoder.com/jwt-vue-vuex-authentication/) 21 | 22 | > [Vue File Upload example using Axios](https://bezkoder.com/vue-axios-file-upload/) 23 | 24 | Fullstack with Node.js Express: 25 | > [Vue.js + Node.js Express + MySQL](https://bezkoder.com/vue-js-node-js-express-mysql-crud-example/) 26 | 27 | > [Vue.js + Node.js Express + PostgreSQL](https://bezkoder.com/vue-node-express-postgresql/) 28 | 29 | > [Vue.js + Node.js Express + MongoDB](https://bezkoder.com/vue-node-express-mongodb-mevn-crud/) 30 | 31 | Fullstack with Spring Boot: 32 | > [Vue.js + Spring Boot](https://bezkoder.com/spring-boot-vue-js-crud-example/) 33 | 34 | > [Vue.js + Spring Boot + MongoDB](https://bezkoder.com/spring-boot-vue-mongodb/) 35 | 36 | Fullstack with Django: 37 | > [Vue.js + Django](https://bezkoder.com/django-vue-js-rest-framework/) 38 | 39 | Integration (run back-end & front-end on same server/port) 40 | > [Integrate Vue.js with Spring Boot](https://bezkoder.com/integrate-vue-spring-boot/) 41 | 42 | > [Integrate Vue App with Node.js Express](https://bezkoder.com/serve-vue-app-express/) 43 | 44 | Serverless with Firebase: 45 | > [Vue Firebase Realtime Database: CRUD example](https://bezkoder.com/vue-firebase-realtime-database/) 46 | 47 | > [Vue Firestore CRUD example](https://bezkoder.com/vue-firestore-crud/) 48 | 49 | ## Project setup 50 | ``` 51 | npm install 52 | ``` 53 | 54 | ### Compiles and hot-reloads for development 55 | ``` 56 | npm run serve 57 | ``` 58 | 59 | ### Compiles and minifies for production 60 | ``` 61 | npm run build 62 | ``` 63 | 64 | ### Run your tests 65 | ``` 66 | npm run test 67 | ``` 68 | 69 | ### Lints and fixes files 70 | ``` 71 | npm run lint 72 | ``` 73 | 74 | ### Customize configuration 75 | See [Configuration Reference](https://cli.vuejs.org/config/). 76 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-3-crud", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.21.1", 12 | "bootstrap": "^4.6.0", 13 | "core-js": "^3.6.5", 14 | "jquery": "^3.6.0", 15 | "popper.js": "^1.16.1", 16 | "vue": "^3.0.0", 17 | "vue-router": "^4.0.6" 18 | }, 19 | "devDependencies": { 20 | "@vue/cli-plugin-babel": "~4.5.0", 21 | "@vue/cli-plugin-eslint": "~4.5.0", 22 | "@vue/cli-service": "~4.5.0", 23 | "@vue/compiler-sfc": "^3.0.0", 24 | "babel-eslint": "^10.1.0", 25 | "eslint": "^6.7.2", 26 | "eslint-plugin-vue": "^7.0.0" 27 | }, 28 | "eslintConfig": { 29 | "root": true, 30 | "env": { 31 | "node": true 32 | }, 33 | "extends": [ 34 | "plugin:vue/vue3-essential", 35 | "eslint:recommended" 36 | ], 37 | "parserOptions": { 38 | "parser": "babel-eslint" 39 | }, 40 | "rules": {} 41 | }, 42 | "browserslist": [ 43 | "> 1%", 44 | "last 2 versions", 45 | "not dead" 46 | ] 47 | } 48 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bezkoder/vue-3-crud/f593fc548a8d5091b21053a3671631ab7442d646/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 |{{ message }}
48 |Please click on a Tutorial...
53 |Please click on a Tutorial...
51 |