Giter Site home page Giter Site logo

mevn-js's Introduction

Vue 3 example with Axios & Vue Router: Build CRUD App

Build a Vue.js 3 CRUD example to consume REST APIs, display and modify data using Axios and Vue Router.

  • Each Tutorial has id, title, description, published status.
  • We can create, retrieve, update, delete Tutorials.
  • There is a Search bar for finding Tutorials by title.

vue-3-crud-example-axios-tutorial

How To Run

Alter the url on the file ".server/config/db.config.js" to your own mongodb user and password:

"mongodb+srv://mongouser:<password>@cluster0.lz21f1y.mongodb.net/?retryWrites=true&w=majority"

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your tests

npm run test

Lints and fixes files

npm run lint

Endpoints on the Back-End

Methods Urls Actions

  • POST /api/tutorials create new Tutorial
  • GET /api/tutorials retrieve all Tutorials
  • GET /api/tutorials/:id retrieve a Tutorial by :id
  • PUT /api/tutorials/:id update a Tutorial by :id
  • DELETE /api/tutorials/:id delete a Tutorial by :id
  • DELETE /api/tutorials delete all Tutorials
  • GET /api/tutorials?title=[keyword] find all Tutorials which title contains keyword

Technology

  • vue: 2.6.10
  • vue-router: 3.1.3
  • axios: 0.19.0

Description

  • package.json contains 3 main modules: vue, vue-router, axios.
  • There are 3 components: TutorialsList, Tutorial, AddTutorial.
  • router.js defines routes for each component.
  • http-common.js initializes axios with HTTP base Url and headers.
  • TutorialDataService has methods for sending HTTP requests to the Apis.
  • vue.config.js configures port for this Vue Client.

mevn-js's People

Contributors

robert1802 avatar

Stargazers

Ravi Sundram avatar Obeydi Abbassi  avatar Jorge armando avatar  avatar adam wozniak avatar David Cole avatar  avatar Ege avatar najinshah.nizar avatar Alexander Escobar avatar Peter Dieleman avatar Dmitriy Bosyy avatar Nick Burakov avatar

Watchers

 avatar

Forkers

jamil-annan

mevn-js's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.