Skip to content
Open

Auth #13

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
4b05174
docs: frontend init
ibimina May 3, 2023
bcf3106
ft(sequelize CLI setup and connection)
Violacordis May 8, 2023
2f4bded
style: refactor styles
ibimina May 10, 2023
8fdb6e3
style: refactor global styles
ibimina May 10, 2023
2f0530c
style: add extra line
ibimina May 10, 2023
3b4e6ba
docs: refactor landing page
ibimina May 10, 2023
cdd5799
docs: add classname to ul element
ibimina May 10, 2023
f997714
style: format li tag in built style
ibimina May 10, 2023
c086658
style: style ul
ibimina May 10, 2023
459a2fe
docs: image assets
ibimina May 10, 2023
b597331
style: remove background
ibimina May 10, 2023
163ed5a
style: add background image to page
ibimina May 10, 2023
4af1d9a
style: add mobile toggle function
ibimina May 10, 2023
b72f744
docs: fix babel import error
ibimina May 10, 2023
92c1d97
docs: add state
ibimina May 10, 2023
553e89b
docs: remove opacity
ibimina May 10, 2023
c51e5c6
docs: change classname
ibimina May 10, 2023
bd0f3c2
style: style navigation
ibimina May 10, 2023
f10da35
docs: add assets
ibimina May 10, 2023
bb3fe37
docs: navbar component
ibimina May 10, 2023
80de50e
docs: navbar styles
ibimina May 10, 2023
bb2b5b5
docs: refactor code, add new section
ibimina May 10, 2023
28cb94b
style: refactor style
ibimina May 10, 2023
38659fb
Merge pull request #1 from ibimina/landing_page
ibimina May 10, 2023
ec15821
docs: change path
ibimina May 10, 2023
36c612b
Merge pull request #4 from ibimina/landing_page
ibimina May 10, 2023
2c1b537
docs: remove frontend path
ibimina May 10, 2023
dce80ca
docs: add classname to li element
ibimina May 10, 2023
75eeffa
style: refactor login style
ibimina May 10, 2023
6840cf2
style: add important for darkmode
ibimina May 10, 2023
00c9e69
Merge pull request #5 from ibimina/Violacordis
hi-heavens May 11, 2023
02634fa
removed the node_modules folder from backend-test
hi-heavens May 11, 2023
f3a380b
Add market list UI
Innocent9712 May 11, 2023
9244898
Update globals.css
ibimina May 12, 2023
fabd2b7
Update Market.module.css
ibimina May 12, 2023
b3da2f1
Merge pull request #6 from ibimina/market
ibimina May 12, 2023
b2a8add
docs: login page
ibimina May 12, 2023
c01e697
style: login style
ibimina May 12, 2023
6564fc2
style: add background color to card box
ibimina May 12, 2023
7976e4a
style: remove link tag global style
ibimina May 12, 2023
14c024b
style: add link hover style
ibimina May 12, 2023
005a365
docs: refactor template
ibimina May 12, 2023
4adc202
Merge pull request #7 from ibimina/login-page
Innocent9712 May 12, 2023
30b345f
docs: sign up page
ibimina May 12, 2023
e383d3f
style: sign up styles
ibimina May 12, 2023
9e98a40
Merge branch 'main' into siginup-page
ibimina May 12, 2023
d34e31b
docs: add sign up page link
ibimina May 12, 2023
d2443c4
style: add link active class styles
ibimina May 12, 2023
f9f72d3
docs: a username filed
ibimina May 12, 2023
8b1da09
style: add spacing
ibimina May 12, 2023
9806cfb
docs: refactor templates
ibimina May 12, 2023
5824ddb
style: refactor styles
ibimina May 12, 2023
873c7db
Merge pull request #8 from ibimina/siginup-page
Innocent9712 May 12, 2023
13c23d0
Merge remote-tracking branch 'origin' into revamp-market
ibimina May 12, 2023
afc8068
Merge pull request #9 from ibimina/revamp-market
Innocent9712 May 12, 2023
a940d85
created the migrations
hi-heavens May 13, 2023
4273214
completed the user schema
hi-heavens May 16, 2023
e0517a4
successfully run the migrated file
hi-heavens May 16, 2023
b2e162b
fixed the error with the password column
hi-heavens May 16, 2023
1d9ac77
updated the URL to use env details
hi-heavens May 16, 2023
dae3a35
Merge pull request #10 from ibimina/ft-user-schema
hi-heavens May 16, 2023
41d2b15
Merge pull request #11 from ibimina/ft-user-schema
hi-heavens May 16, 2023
6927575
Add add alert feature
Innocent9712 May 17, 2023
54c0d1a
Merge pull request #12 from ibimina/add-alert
ibimina May 17, 2023
9a7cf9b
added authentication
Barnyvic May 17, 2023
e5b35f3
Merge branch 'main' of https://github.com/ibimina/connect-readme into…
Barnyvic May 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.env
.eslintrc
.prettierrc.json
49 changes: 49 additions & 0 deletions Backend/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const express = require("express");
require("dotenv").config();
const { sequelize } = require("./src/sequelize/models");
const authrouter = require("./src/auth/auth.route")
const cookieParser = require("cookie-parser");

const app = express();
const port = process.env.PORT;

app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(cookieParser());

const connectDb = async () => {
try {
console.log("Connecting to database...");
await sequelize.authenticate();

console.log("Connection has been established successfully.");
} catch (error) {
console.error("Unable to connect to the database:", error);
}
};

// Default Route
app.get("/api/v1", (req, res) => {
return res.json({
status: true,
message: "Hello World",
});
});

app.use("/api/v1/auth", authrouter);

// Catching all Undefined Routes
app.use("*", (req, res) => {
return res.status(404).json({
status: false,
message: `Route ${req.originalUrl} not found`,
});
});

// Starting server
(async () => {
await connectDb();
app.listen(port, () => {
console.log(`Server started on port http://localhost:${port}`);
});
})();
3 changes: 3 additions & 0 deletions Backend/env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PORT= port
DATABASE_URL= "database url"
JWT_SECRET = "jwt-secret"
Loading