Skip to content
Simple and basic Node.js backend with user login. Vulnerable to SQL injection.
JavaScript TSQL
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
database
routes
.gitattributes
.gitignore
LICENSE
README.md
package-lock.json
package.json
server.js

README.md

Installation

MySql Database

With Docker:

  1. Create MySql Container

    docker run -p 3306:3306 --name mysql_db_server -e MYSQL_ROOT_PASSWORD=admin123 -d mysql:5.7.24

  2. Create a linked PhpMyAdmin Container

    docker run --name myadmin -d --link mysql_db_server:db -p 8080:80 phpmyadmin/phpmyadmin

  3. Import ./database/users.sql to your database.

  4. Change datebase, host, etc. in ./database/mysql.js

Run NodeJS server

nodemon server.js
  • PhpMyAdmin runs at http://192.168.99.100:8080
  • MySql runs at 192.168.99.100
  • NodeJS server runs at http://localhost:3000
You can’t perform that action at this time.