Pauloper1 / backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation

Use npm to install the required packages.

npm i

MySQL is needed locally. For installation details view the MySQL page. After installation you may face this issue

Usage

Create a .env file in the root of the project it should contain the following

SQL_USERNAME=username
SQL_PASSWORD=password
SQL_HOST=host
SQL_PORT=port

Run server using

node index.js

To change port

const express = require('express')
const app = express();

// Port
const port = 3000
app.listen(port, () => {
    console.log("Server running on port " + port);
})

app.get("", (req, res) => {
    res.send("<p>Server is up and running</p>")
})

About


Languages

Language:JavaScript 100.0%