Skip to content

Commit

Permalink
Changes in home page + url of pics
Browse files Browse the repository at this point in the history
  • Loading branch information
insane1304 committed Apr 24, 2021
1 parent 5b40f22 commit 55e07ed
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
15 changes: 10 additions & 5 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,22 @@ app.use(passport.initialize());
app.use(passport.session());

app.use(flash());
// mongoose.connect("mongodb://localhost:27017/todo", {
// useNewUrlParser: true,
// useUnifiedTopology: true
// });
mongoose.connect(process.env.DATABASE_URL,{useNewUrlParser:true, useUnifiedTopology: true });
mongoose.connect("mongodb://localhost:27017/todo", {
useNewUrlParser: true,
useUnifiedTopology: true
});
// mongoose.connect(process.env.DATABASE_URL,{useNewUrlParser:true, useUnifiedTopology: true });

mongoose.set("useCreateIndex", true);
const connection = mongoose.connection;
connection.once('open', () => {
console.log("MongoDB database connection established successfully");
});

// mongoose.connect(process.env.DATABASE_URL , { useNewUrlParser: true, useUnifiedTopology: true })
// .then(connect => console.log('connected to mongodb..'))
// .catch(e => console.log('could not connect to mongodb', e))

const usersSchema = new mongoose.Schema({
username: String,
password: String,
Expand Down
6 changes: 3 additions & 3 deletions views/home.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@
<div class="col-sm-6 col-xs-12 col-card">
<div class="login-card">
<div class="card-body">
<h3 class="name"><strong>Admin Login</strong></h3>
<h3 class="name"><strong>Login</strong></h3>
<img src="resources/user-login.png" class="admin-img img-fluid" alt="">
</div>
</div>
</div>
<div class="col-sm-6 col-xs-12 visitor-img col-card">
<!-- <div class="col-sm-6 col-xs-12 visitor-img col-card">
<div class="login-card">
<div class="card-body">
<h3 class="name"><strong>Visitor Login</strong></h3>
Expand All @@ -134,7 +134,7 @@
</div>
</a>
</div>
<% } %>
<% } %> -->


</section>
Expand Down
4 changes: 3 additions & 1 deletion views/signup.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
appId: "1:436501438451:web:55861e256d915128e9fc86",
measurementId: "G-QTTWTF8QPG"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
console.log(firebase);
Expand Down Expand Up @@ -290,8 +290,10 @@
for (let i = 0; i < 30; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
var date=new Date(Date.now());
// const d=new Date() + '-' + 'base64';
var src = canvas.toDataURL();
result=result+date;
ref.child(result).putString(src, 'data_url').then(function(snapshot) {
console.log('Uploaded a data_url string!');
console.log(result);
Expand Down

0 comments on commit 55e07ed

Please sign in to comment.