diff --git a/client/src/components/Config.js b/client/src/components/Config.js index 05db9cf..05e0fe5 100644 --- a/client/src/components/Config.js +++ b/client/src/components/Config.js @@ -1,4 +1,4 @@ -export const BACK_SERVER_URL = 'http://localhost:5000' //localhost +// export const BACK_SERVER_URL = 'http://localhost:5000' //localhost //////////////////////////// For Header Configs ////////////////////////////////// @@ -19,4 +19,4 @@ if (token && tokenExp) { config.headers['Content'] = "application/json;charset=UTF-8"; -export const headersConfig = config \ No newline at end of file +export const headersConfig = config diff --git a/package.json b/package.json index 9809729..b205bc0 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "scripts": { "start": "node server/index.js", - "backend": "nodemon server/index.js --exec babel-node --presets babel-preset-env", + "backend": "nodemon server/index.js", "frontend": "npm run start --prefix client", "dev": "concurrently \"npm run backend\" \"npm run start --prefix client\"" }, @@ -33,9 +33,6 @@ "devDependencies": { "concurrently": "^4.1.0", "nodemon": "^1.19.1", - "babel-cli": "^6.26.0", - "babel-core": "^6.26.3", - "babel-preset-env": "^1.7.0", "morgan": "^1.9.1" } } \ No newline at end of file diff --git a/server/index.js b/server/index.js index bc195b3..ec6a5f1 100644 --- a/server/index.js +++ b/server/index.js @@ -1,12 +1,12 @@ -import express from 'express'; -import mongoose from 'mongoose'; -import path from 'path'; -import cors from 'cors'; -import bodyParser from 'body-parser'; -import cookieParser from 'cookie-parser'; -import morgan from 'morgan'; -import config from './config/key'; -import helmet from 'helmet'; +const express = require('express'); +const cookieParser = require('cookie-parser'); +const bodyParser = require('body-parser'); +const morgan = require('morgan'); +const path = require('path'); +const mongoose = require('mongoose'); +const cors = require('cors'); +const helmet = require('helmet'); +const config = require('./config/key'); const app = express(); diff --git a/server/middleware/auth.js b/server/middleware/auth.js index 7e129d2..ae34373 100644 --- a/server/middleware/auth.js +++ b/server/middleware/auth.js @@ -1,5 +1,5 @@ -import moment from 'moment'; -import { User } from '../models/user'; +const moment = require('moment'); +const { User } = require('../models/user'); let auth = (req, res, next) => { const token = req.header('x_token');