Skip to content

Commit b85aa12

Browse files
committed
added cors, and CEP document
1 parent 9e8a43a commit b85aa12

5 files changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ jobs:
2929
- name: Build and push Docker image
3030
uses: docker/build-push-action@v5
3131
with:
32-
context: .
32+
context: ./backend
3333
push: true
3434
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/url-shortener:latest

22SW050_71_MAD_CEP.pdf

1.56 MB
Binary file not shown.

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 📄 Link to Download CEP
2+
3+
You can download the complete **Course End Project (CEP) Report** for this mobile application from the root of this repository:
4+
5+
[📘 Download 22SW050_71_MAD_CEP.pdf](./22SW050_71_MAD_CEP.pdf)
6+
17
# URL Shortener Using Mongodb
28

39
A simple URL shortener built with Node.js and Express.js that stores shortened URLs in MongoDB. This project allows users to create short URLs and redirect to the original URLs.

backend/app.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,22 @@ const cookieParser = require('cookie-parser');
44
const path = require('path');
55
const { connectToMongoDB } = require('./connection.js');
66
const passport = require('passport');
7+
const cors = require("cors");
78

89
const app = express();
910
app.use(express.json());
11+
app.use(cors());
1012
app.use(express.urlencoded({ extended: false }));
1113
app.use(cookieParser());
1214
app.set('trust proxy', true);
1315

16+
// app.use((req, res, next)=> {
17+
// console.log(req.method);
18+
// console.log(req.url);
19+
// console.log(req.body);
20+
// next();
21+
// })
22+
1423
connectToMongoDB(process.env.MONGODB_URI).then(() => {
1524
console.log('Mongoose connected!')
1625
});

flutter_app/pubspec.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ dependencies:
3737
http: ^1.5.0
3838
shared_preferences: ^2.5.3
3939
intl: ^0.18.1
40+
41+
4042
dev_dependencies:
4143
flutter_test:
4244
sdk: flutter

0 commit comments

Comments
 (0)