Skip to content

Commit

Permalink
Merge pull request #2 from Ashmitha-art/master
Browse files Browse the repository at this point in the history
Removed Restrictions for Email Domains and Updated Email Functionality to Use Resend.io
  • Loading branch information
gregv authored Jul 5, 2024
2 parents 3227d1f + 512618a commit 28ce23f
Show file tree
Hide file tree
Showing 17 changed files with 10,277 additions and 9,548 deletions.
49 changes: 27 additions & 22 deletions app.js
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);
105 changes: 50 additions & 55 deletions app.json
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"]
}
Loading

0 comments on commit 28ce23f

Please sign in to comment.