Skip to content

Commit

Permalink
reworked config. divided settings conf
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashhm committed Aug 28, 2017
1 parent a53e82a commit dda273a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion client/api/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import request from 'superagent';

import { apiPrefix } from '../../etc/config.json';
import { apiPrefix } from '../etc/config.json';


//super agent instead of axis
Expand Down
3 changes: 3 additions & 0 deletions client/etc/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"apiPrefix": "http://localhost:8080"
}
2 changes: 1 addition & 1 deletion client/stores/NotesStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ const NotesStore = Object.assign({}, EventEmitter.prototype, {
});

AppDispatcher.register(function(action) {
//console.log(AppConstants, action.type);
switch(action.type) {
case AppConstants.LOAD_NOTES_REQUEST: {
_isLoading = true;

NotesStore.emitChange();
break;
}
Expand Down
9 changes: 0 additions & 9 deletions etc/config.json

This file was deleted.

2 changes: 1 addition & 1 deletion server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import express from 'express';
import bodyParser from 'body-parser';
import cors from 'cors';

import {serverPort} from '../etc/config.json';
import {serverPort} from './etc/config.json';

import * as db from '../server/utils/DataBaseUtils';

Expand Down
8 changes: 8 additions & 0 deletions server/etc/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"serverPort": 8080,
"db" : {
"name": "notes",
"host": "localhost",
"port": "27017"
}
}

0 comments on commit dda273a

Please sign in to comment.