vue connection database

vue connection database axios in vue 1. Install axios npm: npm install axios -S cdn: <script src="https://unpkg.com/axios/dist/axios.min.js"></script> 2. Configure axios Create a new api/index.js file in the project to configure axios api/index.js import axios from 'axios'; let http = axios.create({ base ...

Posted on Wed, 13 Nov 2019 14:14:27 -0500 by aneesme

The way of real server rendering 04 - redux-01

All the source code, documents and pictures are in the warehouse of github, Click to enter the warehouse Related reading React server rendering road 01 - project infrastructure construction The way of React server rendering 02: the simplest server rendering The rendering road of React server 03 - route The way of real server rendering 04 - red ...

Posted on Fri, 08 Nov 2019 05:11:52 -0500 by jasonmills58

Login function of Vue cli3+Mongodb+express

My project is Vue Cli3+Electron+Antd+Mongodb+express Mongodb and Studio 3T are downloaded and installed.Specific can be Google or Baidu.Then start Mongodb Then open Studio 3T, connect to the database port, right-click to create a new database. The new database I create here is login.user is your own newly created data collection, roughly as fol ...

Posted on Thu, 07 Nov 2019 22:42:00 -0500 by cirene

Front-end technology: how to execute methods in the UI after vuex state management action asynchronous call ends

1. Origin of the problem Recently, when working on the vue.js project, we encountered the problem of communication and interoperability between vuex state management action and vue.js method.The scene is as follows: 2. First Solution For example, when we initialize a page, we need to get data from the server through the API interface. Before th ...

Posted on Thu, 07 Nov 2019 19:11:46 -0500 by snaack

node returns geojson to shp to the front end

When node transfers geojson to shp, it needs to call the [ogr2ogr][1] library. When it calls the ogr2ogr library, because it calls gdal's tools to implement the geojson switches to shp, so you need to install gdal and configure environment variables. For details, please refer to This link . After the environment is configured, the code can be ...

Posted on Sun, 03 Nov 2019 18:46:01 -0500 by drbigfresh

ajax request encapsulation and component call method (async/await) in vue

async/await 1) async/await scenario This is a solution to the asynchronous problem with the synchronous thinking. The current interface call needs to wait until the interface returns the value to render the page. 2) explanation of terms     >async The usage of async, which is put in front of the function as a keyword, is used to indic ...

Posted on Sat, 02 Nov 2019 23:15:30 -0400 by deed02392

vue can't get content through this.refs.name by using refs generated dynamically by v-for

When uploading a picture in a vue project, I get the files attribute in the input to process the uploaded picture, and then convert it to base64 and transfer it to the background. When this method is used on refs generated dynamically on non-v-for, you can get related elements through this.$refs.name.files[0], but you can use this method in the ...

Posted on Fri, 01 Nov 2019 02:44:53 -0400 by bubblocity

Write a plug-in Vue Loading plug-in

No matter what kind of website is to be implemented, the Loading status is an indispensable part, which gives users a chance to breathe and a time for the server to deliver response. How to use it Whether the Loading plug-in is written from 0 or downloaded directly, it will be abstracted as a component. When it is used, it will load, or show or ...

Posted on Tue, 29 Oct 2019 07:13:26 -0400 by Shadow Wolf

express implementation I guess you like the function

Tools: using cookie parser middleware; Principle: every time you visit a specific article, it indicates that the client may be interested in this kind of article. Add the label of this kind of article to the cookie, and the field is like; Then return to the module that I guess you like, and send the aios request. The request parameter is cook ...

Posted on Mon, 28 Oct 2019 15:59:46 -0400 by FFEMTcJ

Create a react project from scratch

First, create a folder, open the terminal input 1 create-react-app myapp Wait for the project to be built, after the project is built 1 cd myapp //Enter the created project folder 2 3 yarn start //Start the project, or 4 5 npm start After deleting unnecessary files, combing needs to install those dependencies 1. React route ...

Posted on Mon, 28 Oct 2019 12:23:24 -0400 by pbarney