Skip to content

Commit

Permalink
Adding .env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
AlameerAshraf committed Feb 14, 2020
1 parent 1aa7da5 commit abc6266
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 23 deletions.
11 changes: 1 addition & 10 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
NAME=DEV
PORT=3255
ROUTING_PREFIX=/
DATA_BASE_URL=mongodb://localhost:27017/seqtdb

PROXY=195.87.150.104
PROXY_PORT=80

GAPIMP_client_id=4pxVa7OvDNOMmT3GGTfdwM1dIvKACqdC
GAPIMP_client_secret=fGV6XuvrUVVDqsAe

GAPIMP_URL=https://api.dev.se.com/token
bfoURL=https://api.qa.se.com/rest/bfo/opportunity/2.0/opportunities?seopptyreferenceId=
DATA_BASE_URL=mongodb://localhost:27017/postsDB
11 changes: 1 addition & 10 deletions .env.staging
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
NAME=STAGING
PORT=3255
ROUTING_PREFIX=/seqt/
DATA_BASE_URL=mongodb://localhost:27017/seqtdb

PROXY=165.225.94.17
PROXY_PORT=80

GAPIMP_client_id=4pxVa7OvDNOMmT3GGTfdwM1dIvKACqdC
GAPIMP_client_secret=fGV6XuvrUVVDqsAe

GAPIMP_URL=https://api.dev.se.com/token
bfoURL=https://api.qa.se.com/rest/bfo/opportunity/2.0/opportunities?seopptyreferenceId=
DATA_BASE_URL=mongodb://localhost:27017/postsDB
6 changes: 3 additions & 3 deletions src/application/post/post.app.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import postService from '';
import postModel from '';
import postService from '../../services/post.service';
import postModel from '../../models/post/post';

import createPost from './create-post/create-post';


// Construct the post service!
const service = new postService();
const service = new postService(new postModel().constructModel() );

export default () => {
return Object.freeze({
Expand Down
23 changes: 23 additions & 0 deletions src/models/post/post.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import mongoose, { Schema } from "mongoose";
import subject from "./subject";

class post {
constructor() {
new subject().constructModel();
}

initSchema() {
const schema = new Schema({
title: { type: String, required: true },
body: { type: String }
});

return mongoose.model("post", schema);
}

constructModel() {
return this.initSchema();
}
}

export default post;

0 comments on commit abc6266

Please sign in to comment.