Delete Backend directory
This commit is contained in:
parent
8d030062e8
commit
1665d1b9d7
2 changed files with 0 additions and 30 deletions
|
|
@ -1,12 +0,0 @@
|
||||||
const mysql = require('mysql2');
|
|
||||||
|
|
||||||
const config = require('../config/config.json');
|
|
||||||
|
|
||||||
const pool = mysql.createPool({
|
|
||||||
host: config.host,
|
|
||||||
user: config.user,
|
|
||||||
database: config.database,
|
|
||||||
password:config.password
|
|
||||||
});
|
|
||||||
|
|
||||||
module.export = pool.promise();
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
const express = require('express');
|
|
||||||
|
|
||||||
const bodyParser = require('body-parser');
|
|
||||||
|
|
||||||
const app = express();
|
|
||||||
|
|
||||||
const ports = process.env.PORT || 3000;
|
|
||||||
|
|
||||||
app.use(bodyParser.json());
|
|
||||||
|
|
||||||
app.use((req, res, next) => {
|
|
||||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
||||||
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE');
|
|
||||||
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
|
|
||||||
next();
|
|
||||||
} );
|
|
||||||
|
|
||||||
app.listen(ports, () => console.log(`Listening on ports ${ports}`));
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue