-
-
Notifications
You must be signed in to change notification settings - Fork 128
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 #267 from vinitkumar/develop
Login fix
- Loading branch information
Showing
8 changed files
with
83 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Example of Environment Variables | ||
|
||
NODE_ENV=development | ||
GITHUB_CLIENT_SECRET="your_github_client_secret" | ||
SECRET="your_secret" | ||
GITHUB_CLIENT_ID="your_github_client_id" | ||
DB="mongodb://localhost/ntwitter" | ||
# Use this when run via Docker | ||
# DB="mongodb://mongodb/ntwitter" | ||
PORT=3000 |
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,13 @@ | ||
name: Greetings | ||
|
||
on: [pull_request, issues] | ||
|
||
jobs: | ||
greeting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/first-interaction@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-message: 'Hi! Thanks for taking the time. Please fill up the issue in as much detail as possible'' first issue' | ||
pr-message: 'Thanks for making a contribution to the project. One of the maintainers will look into it and get back to you as soon as possible'' first pr' |
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 |
---|---|---|
|
@@ -4,4 +4,5 @@ npm-debug.log | |
.idea | ||
.DS_Store | ||
.sass-cache | ||
data/* | ||
.env | ||
data/* |
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 |
---|---|---|
@@ -1,48 +1,51 @@ | ||
const path = require("path"); | ||
const rootPath = path.normalize(__dirname + "/.."); | ||
const DB = process.env.DB; | ||
const clientID = process.env.GITHUB_CLIENT_ID; | ||
const clientSecret = process.env.GITHUB_CLIENT_SECRET; | ||
const DEVELOPMEN_DB = process.env.DEVELOPMEN_DB || 'mongodb://localhost:27017/ntwitter'; | ||
|
||
const envPath = process.env.ENVPATH || ".env"; | ||
const dotenv = require("dotenv"); | ||
// Path to the file where environment variables | ||
dotenv.config({path: envPath }); | ||
|
||
module.exports = { | ||
development: { | ||
// Use different urls for running service with Docker and without Docker | ||
db: DEVELOPMEN_DB, | ||
//db: "mongodb://mongodb:27017/ntwitter", | ||
//db: "mongodb://localhost:27017/ntwitter", | ||
db: process.env.DB, | ||
port: process.env.PORT, | ||
root: rootPath, | ||
app: { | ||
name: "Node Twitter" | ||
}, | ||
github: { | ||
clientID: "e3930cf94c772ba10ef1", | ||
clientSecret: "fb1284b1874444a9c0c55c963092f836596ecc56", | ||
// GITHUB_CLIENT_SECRET and GITHUB_CLIENT_ID should be defined in .env file | ||
// which is stored locally on your computer or those variables values | ||
// can be passed from Docker container | ||
clientSecret: process.env.GITHUB_CLIENT_SECRET, | ||
clientID: process.env.GITHUB_CLIENT_ID, | ||
callbackURL: "http://localhost:3000/auth/github/callback" | ||
} | ||
}, | ||
test: { | ||
//db: process.env.DB, | ||
// Hack to allow tests run | ||
db: "mongodb://root:[email protected]:39078/ntwitter", | ||
root: rootPath, | ||
app: { | ||
name: "Nodejs Express Mongoose Demo" | ||
}, | ||
github: { | ||
clientID: "c2e0f478634366e1289d", | ||
clientSecret: "0bfde82383deeb99b28d0f6a9eac001a0deb798a", | ||
clientSecret: process.env.GITHUB_CLIENT_SECRET, | ||
clientID: process.env.GITHUB_CLIENT_ID, | ||
callbackURL: "http://localhost:3000/auth/github/callback" | ||
} | ||
}, | ||
production: { | ||
db: DB, | ||
db: process.env.DB, | ||
root: rootPath, | ||
app: { | ||
name: "Nodejs Express Mongoose Demo" | ||
}, | ||
github: { | ||
clientID: clientID, | ||
clientSecret: clientSecret, | ||
clientSecret: process.env.GITHUB_CLIENT_SECRET, | ||
clientID: process.env.GITHUB_CLIENT_ID, | ||
callbackURL: "http://nitter.herokuapp.com/auth/github/callback" | ||
} | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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