The code is set up this way: var express = require('express'); var router = express.Router(); var mongo = require('mongodb').MongoClient; function getData(){
I'm using POSTMAN dev tool to test this API : http://localhost:3000/users and I have this express.js script : const express = require("express"); const cors
I am trying to manage a react app with react router and node js server my router in react: <BrowserRouter> <Switch> <PrivateRoute tok
mongoose.connect(process.env.DATABASE_URL, {useNewUrlParser: true}); const MyModel = mongoose.model(mymodel, new Schema({ name: String })); This creates a dat
So I'm trying to follow the security best practices and I'm sending my JWT token over my React app in a only-secure http-only cookie. This works fine for requ
I'm currently trying to get COVID-19 from the Covid Data Repository by Johns Hopkins. https://github.com/CSSEGISandData/COVID-19 The repo get updated with new d
I have written this function to do update in dynamo table const updateTask = async (req, res) => { try { const { existingTaskText,updatedTaskText } = r
I have this block of code: router.post('/users/login', async (req, res) => { try { const { email, password } = req.body const user = await User.fi
I saw several posts on the subject but without result. I have on the one hand a form which collects information (name, first name etc) then saves it in database
I have the following code in my express app (app.js file): const express = require("express"); const app = express(); app.set('view engine', 'ejs'); app.get(
I have an ExpressJS routing for my API and I want to call it from within NodeJS var api = require('./routes/api') app.use('/api', api); and inside my ./route
We can group our routes like this in Laravel: Route::group("admin", ["middleware" => ["isAdmin"]], function () { Route::get("/", "AdminController@inde
The idea is to make a lot of separate react apps on the one express server, so each of them should appear using the url something like mysite.com/app1, mysite.c
1 - how should the learning ranking be (Mongo db,Node.js,Express) 2 - is it only available for the web or is it also available for mobile? 3 - What do they do
I am looking to use express-unless to exclude a /health path from using middleware.auth. I am having syntax issues, and I am unable to test this locally. If I
I'm working on the serverless web MEAN and I'm trying to publish on vercel. When I'm trying to access some route through the navigation menu, the router is work
I'm running into a small issue with my "server". So while I'm trying to learn backend to frontend communication, I was messing around and trying to create an "a
package.json scripts: "scripts": { "build": "webpack --config config/webpack.prod.config.js", "dev": "webpack --config config/webpack.dev.config.js &a
I am trying to handle multiple pages for a search with expressjs but it seems that doesn't work at all. I have the root and the query params /properties/search
i deeply need help with this audio file upload to cloudinary issue I have had for several days now. I tried many times to make it work, but i am still strugglin