forked from techx/quill
-
-
Notifications
You must be signed in to change notification settings - Fork 7
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 #2 from Ashmitha-art/master
Removed Restrictions for Email Domains and Updated Email Functionality to Use Resend.io
- Loading branch information
Showing
17 changed files
with
10,277 additions
and
9,548 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 |
---|---|---|
@@ -1,48 +1,53 @@ | ||
// Load the dotfiles. | ||
require('dotenv').load({silent: true}); | ||
require("dotenv").config({ silent: true }); | ||
|
||
var express = require('express'); | ||
var express = require("express"); | ||
|
||
// Middleware! | ||
var bodyParser = require('body-parser'); | ||
var methodOverride = require('method-override'); | ||
var morgan = require('morgan'); | ||
var bodyParser = require("body-parser"); | ||
var methodOverride = require("method-override"); | ||
var morgan = require("morgan"); | ||
|
||
var mongoose = require('mongoose'); | ||
var port = process.env.PORT || 3000; | ||
var database = process.env.DATABASE || process.env.MONGODB_URI || "mongodb://localhost:27017"; | ||
var mongoose = require("mongoose"); | ||
var port = process.env.PORT || 3000; | ||
var database = | ||
process.env.DATABASE || | ||
process.env.MONGODB_URI || | ||
"mongodb://localhost:27017"; | ||
|
||
var settingsConfig = require('./config/settings'); | ||
var adminConfig = require('./config/admin'); | ||
var settingsConfig = require("./config/settings"); | ||
var adminConfig = require("./config/admin"); | ||
|
||
var app = express(); | ||
var app = express(); | ||
|
||
// Connect to mongodb | ||
mongoose.connect(database); | ||
|
||
app.use(morgan('dev')); | ||
app.use(morgan("dev")); | ||
|
||
app.use(bodyParser.urlencoded({ | ||
extended: true | ||
})); | ||
app.use( | ||
bodyParser.urlencoded({ | ||
extended: true, | ||
}) | ||
); | ||
app.use(bodyParser.json()); | ||
|
||
app.use(methodOverride()); | ||
|
||
app.use(express.static(__dirname + '/app/client')); | ||
app.use(express.static(__dirname + "/app/client")); | ||
|
||
// Routers ===================================================================== | ||
|
||
var apiRouter = express.Router(); | ||
require('./app/server/routes/api')(apiRouter); | ||
app.use('/api', apiRouter); | ||
require("./app/server/routes/api")(apiRouter); | ||
app.use("/api", apiRouter); | ||
|
||
var authRouter = express.Router(); | ||
require('./app/server/routes/auth')(authRouter); | ||
app.use('/auth', authRouter); | ||
require("./app/server/routes/auth")(authRouter); | ||
app.use("/auth", authRouter); | ||
|
||
require('./app/server/routes')(app); | ||
require("./app/server/routes")(app); | ||
|
||
// listen (start app with node server.js) ====================================== | ||
module.exports = app.listen(port); | ||
console.log("App listening on port " + port); | ||
console.log("App listening on port " + port); |
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,57 +1,52 @@ | ||
{ | ||
"name": "Quill", | ||
"description": "Registration, for hackathons!", | ||
"env": { | ||
"NODE_ENV": { | ||
"description": "dev or production", | ||
"value": "dev" | ||
}, | ||
"JWT_SECRET": { | ||
"description": "Long random string used to verify JWT tokens for user authentication", | ||
"generator": "secret" | ||
}, | ||
"ROOT_URL": { | ||
"description": "Root URL for your registration system", | ||
"value": "http://localhost:3000" | ||
}, | ||
"ADMIN_EMAIL": { | ||
"description": "Credentials for the admin user created at app initialization", | ||
"value": "admin@example.com" | ||
}, | ||
"ADMIN_PASS": "party", | ||
"EMAIL_ADDRESS": { | ||
"description": "The email address that is included in the 'email us' link at the bottom of emails.", | ||
"value": "team@example.com" | ||
}, | ||
"HACKATHON_NAME": "Hackathon", | ||
"TWITTER_HANDLE": { | ||
"description": "Everything after https://twitter.com/", | ||
"value": "hackathon" | ||
}, | ||
"FACEBOOK_HANDLE": { | ||
"description": "Everything after https://facebook.com/", | ||
"value": "hackathon" | ||
}, | ||
"EMAIL_CONTACT": { | ||
"description": "Used to send verification, registration, and confirmation emails", | ||
"value": "Hackathon Team <team@example.com>" | ||
}, | ||
"EMAIL_HOST": "smtp.gmail.com", | ||
"EMAIL_USER": "foo@bar.com", | ||
"EMAIL_PASS": "password", | ||
"EMAIL_PORT": "465", | ||
"EMAIL_HEADER_IMAGE": "https://s3.amazonaws.com/hackmit-assets/Banner_600.jpg", | ||
"TEAM_MAX_SIZE": { | ||
"description": "Limits the number of users that can join a team", | ||
"value": "4" | ||
}, | ||
"SLACK_HOOK": { | ||
"description": "Used to send error messages to your Slack team when the API catches an error", | ||
"value": "https://hooks.slack.com/services/your-api-key" | ||
} | ||
}, | ||
"addons": [ | ||
"mongolab" | ||
], | ||
"keywords": ["quill", "node", "express", "mongo"] | ||
"name": "Quill", | ||
"description": "Registration, for hackathons!", | ||
"env": { | ||
"NODE_ENV": { | ||
"description": "dev or production", | ||
"value": "dev" | ||
}, | ||
"JWT_SECRET": { | ||
"description": "Long random string used to verify JWT tokens for user authentication", | ||
"generator": "secret" | ||
}, | ||
"ROOT_URL": { | ||
"description": "Root URL for your registration system", | ||
"value": "http://localhost:3000" | ||
}, | ||
"ADMIN_EMAIL": { | ||
"description": "Credentials for the admin user created at app initialization", | ||
"value": "admin@apply.ohack.dev" | ||
}, | ||
"ADMIN_PASS": "party", | ||
"EMAIL_ADDRESS": { | ||
"description": "The email address that is included in the 'email us' link at the bottom of emails.", | ||
"value": "team@apply.ohack.dev" | ||
}, | ||
"HACKATHON_NAME": "Hackathon", | ||
"TWITTER_HANDLE": { | ||
"description": "Everything after https://twitter.com/", | ||
"value": "hackathon" | ||
}, | ||
"FACEBOOK_HANDLE": { | ||
"description": "Everything after https://facebook.com/", | ||
"value": "hackathon" | ||
}, | ||
"EMAIL_CONTACT": { | ||
"description": "Used to send verification, registration, and confirmation emails", | ||
"value": "Hackathon Team <team@apply.ohack.dev>" | ||
}, | ||
|
||
"EMAIL_HEADER_IMAGE": "https://s3.amazonaws.com/hackmit-assets/Banner_600.jpg", | ||
"TEAM_MAX_SIZE": { | ||
"description": "Limits the number of users that can join a team", | ||
"value": "4" | ||
}, | ||
"SLACK_HOOK": { | ||
"description": "Used to send error messages to your Slack team when the API catches an error", | ||
"value": "https://hooks.slack.com/services/your-api-key" | ||
} | ||
}, | ||
"addons": ["mongolab"], | ||
"keywords": ["quill", "node", "express", "mongo"] | ||
} |
Oops, something went wrong.