Skip to content

maeshchenko/query-to-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

query-to-db

Saving data from url query to mongoose database

STORE INFO TO DATABASE: just visit url
http://localhost:5000/?login=admin&password=password&url=www.okna.ru&message=go%20to%20the%20/wp-admin.php
Fields (All fields are not required):

  • login
  • password
  • url
  • message
    result in database:
    _id: 5faff035df03f467f51c58ec
    login:"admin"
    password:"password"
    url:"www.okna.ru"
    message:"go to the /wp-admin.php"
    createdAt:2020-11-14T14:56:53.199+00:00
    __v:0

READ DATA FROM DATABASE: just visit another url:
http://localhost:5000/data

To start:

  1. create file and add data to config/config.env:
    NODE_ENV=development
    PORT=5000
    MONGO_URI=YOUR MONGO URI

  2. start server:
    Development: npm run dev
    Production: npm run start


To do:

  1. auth for /data
  2. table view of data in /data
  3. deploy to real vps

About

Saving data from url query to mongoose database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors