-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from neryams/0.1.1
0.1.1 Release
- Loading branch information
Showing
36 changed files
with
2,833 additions
and
1,375 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export const API_PORT = 16906; | ||
|
||
export default { | ||
API_PORT: API_PORT, | ||
CLIENT_PORT: 4000, | ||
MONGODB_PORT: 27017, | ||
|
||
// Relative to the cwd path. | ||
// Prefixing with a ~ will make the path relative to the project root (the parent folder of this config file's folder) | ||
LOCAL_STORAGE: '~/uploads/images', | ||
LOCAL_ORIGINAL_STORAGE: '~/uploads/original', | ||
|
||
LOCAL_UPLOADS_BASE_URL: `\/\/localhost:${API_PORT}/images/`, | ||
MAX_UPLOAD_SIZE: 20 * 1024 * 1024, | ||
IMAGE_SIZES: [ | ||
300, | ||
600, | ||
1200 | ||
], | ||
|
||
JWT_SECRET: 'wow very secret, much secure' // Change this (wow) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import defaultConfig from './default'; | ||
import prodConfig from './production'; | ||
|
||
export { defaultConfig, prodConfig }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import defaultConfig from './default'; | ||
|
||
export default { | ||
LOCAL_UPLOADS_BASE_URL: `\/\/localhost:${defaultConfig.CLIENT_PORT}/images/` | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { join } from 'path'; | ||
|
||
export const BASE_DIR = join(__dirname, '..', '..'); | ||
export function getAbsolutePath(path: string): string { | ||
if (path.substr(0,1) === '~') { | ||
return path.replace('~', BASE_DIR); | ||
} else { | ||
return join(process.cwd(), path); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import { MONGODB_PORT } from './../../config/env'; | ||
import { connect } from 'mongoose'; | ||
|
||
connect('mongodb://localhost' + (MONGODB_PORT ? `:${MONGODB_PORT}` : '') + '/nxgallery', { useNewUrlParser: true }).then(() => { | ||
import * as config from 'config'; | ||
|
||
connect('mongodb://localhost' + (config.get('MONGODB_PORT') ? `:${config.get('MONGODB_PORT')}` : '') + '/nxgallery', { useNewUrlParser: true }).then(() => { | ||
console.log('Connection Successful'); | ||
}, (err: any) => { | ||
console.error('Connection Failed: ', err); | ||
}); | ||
|
||
export class BaseDatabase { | ||
constructor() { | ||
|
||
} | ||
} |
Oops, something went wrong.