Skip to content

Commit

Permalink
Changed
Browse files Browse the repository at this point in the history
  • Loading branch information
jaewonhimnae committed May 3, 2020
1 parent 0d5061f commit 9b893a5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Config.js
Original file line number Diff line number Diff line change
@@ -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 //////////////////////////////////
Expand All @@ -19,4 +19,4 @@ if (token && tokenExp) {
config.headers['Content'] = "application/json;charset=UTF-8";


export const headersConfig = config
export const headersConfig = config
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
},
Expand All @@ -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"
}
}
18 changes: 9 additions & 9 deletions server/index.js
Original file line number Diff line number Diff line change
@@ -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();

Expand Down
4 changes: 2 additions & 2 deletions server/middleware/auth.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down

0 comments on commit 9b893a5

Please sign in to comment.