Full Stack Vue.js, Express & MongoDB [1] - Express API
Why Stack Overflow recommends it
Stack Overflow users link it when someone needs a step-by-step walkthrough of wiring a Vue front end to an Express and MongoDB backend.
Recommended by 2 people across 2 different months, 2019 to 2021.
What it is
The first part of a three-part Traversy Media tutorial series that builds a small microposts app with Vue.js on the client, Express on the backend and MongoDB as the database, with deployment to Heroku later in the series. This episode covers setting up the Express API. Brad Traversy presents it as a code-along.
What people said
Recommends paddyfields · 2019-12 · Stack Overflow · on “How to use Express with Vue”
No problem. Separate src and dist folders - so your production ready code is bundled into 'dist' when you're ready to deploy. It's quite involved so I'd recommend following a tutorial: [this video]
Recommends QZAK · 2021-03 · Stack Overflow · on “Display Discord Bot info to NuxtJS”
I created an express API that pushes the info that I want and through the VUE app I simply used Axios to get that info. This Mini-series by Traversy Media [this video] helped me A LOT
Cites Yahli · 2019-02 · Stack Overflow · on “Cant GET/ problem with express routes an localhost”
I watched a video by traversy media on youtube and after trying copying 1 for 1 his code i still didnt have any success with the problem. the code is suppose to route the main page('/') to the page(/routes/api/posts'), can anyone find the problem with my code? my index.js code: const express = require('express'); const bodyParser = require('body-parser'); const cors = require('cors'); const app = express(); //Middleware app.use(bodyParser.json()); app.use(cors()); const posts = require('./routes/api/posts'); app.use('/api/posts', posts); const port = process.env.PORT || 5000; app.listen(port, () => console.log('server started on port ' + port)); Posts.js page: const express = require('expres
Cites MaxRocket · 2020-02 · Stack Overflow · on “MongoDB Node Express GET and DELETE work, not POST?”
GET works. DELETE works. Can't figure out why POST won't work with something as simple as. {"akey":"avalue"} Using Postman to test. The error from Postman is "Could not get any response," which is weird, because I have no problems with GET and DELETE. New to Mongo/Node. Following Brad Traversy's [this video] tutorial on Vue, Mongo, Express, Node. Anything stand out? const express = require( 'express' ); const mongodb = require( 'mongodb' ); const router = express.Router(); // GET POSTS router.get( '/', async ( req, res ) => { const posts = await loadPostsCollection(); res.send( await posts.find( {} ).toArray() ); } ); // ADD POST router.post( '/', async ( req, res ) => { const posts = await loadP