Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
940df8f
Bump minimist from 1.2.5 to 1.2.6
dependabot[bot] Apr 1, 2022
394f6ab
Merge pull request #5 from protos-apps/dependabot/npm_and_yarn/minimi…
Apr 29, 2022
ef62ba9
Create README.md
Apr 29, 2022
ad64f18
Update README.md
Apr 29, 2022
a5ada98
Update README.md
Apr 29, 2022
1aece04
Update README.md
Apr 29, 2022
400765b
Update README.md
Apr 29, 2022
0a6383f
Update README.md
Apr 29, 2022
e6b9081
Update README.md
Apr 29, 2022
73c062b
Update README.md
Apr 29, 2022
aa0897e
Update README.md
Apr 29, 2022
9ba37f9
Update README.md
Apr 29, 2022
47bf035
Update README.md
Apr 29, 2022
5dbdf99
Update README.md
Apr 29, 2022
c44f7dc
Update README.md
Apr 29, 2022
2fdc953
Update README.md
Apr 29, 2022
288a000
Update README.md
Apr 29, 2022
944612d
Update README.md
Apr 29, 2022
b63d33d
Update README.md
Apr 29, 2022
a09a9e1
Update README.md
Apr 29, 2022
571a1bd
Update README.md
Apr 29, 2022
5ce7d2f
Update README.md
Apr 29, 2022
56de5ac
Update README.md
Apr 29, 2022
e3d50db
Update README.md
Apr 29, 2022
41dd72f
Update README.md
Apr 29, 2022
4881a4d
Update README.md
Apr 29, 2022
5addffd
Update README.md
Apr 29, 2022
235a5cb
Update README.md
Apr 29, 2022
03bb0b9
Update README.md
Apr 29, 2022
d19db93
Update README.md
Apr 29, 2022
f03032d
Update README.md
Apr 29, 2022
63159ac
Update README.md
Apr 29, 2022
4232fcd
Update README.md
Apr 29, 2022
bc571a7
Update README.md
Apr 29, 2022
14aba89
Update README.md
Apr 29, 2022
ca892bb
Update README.md
Apr 29, 2022
761e447
Update README.md
Apr 29, 2022
6be2a91
Update README.md
Apr 29, 2022
6e4dd36
Update README.md
Apr 29, 2022
f9145f8
Update README.md
Apr 29, 2022
d2cf83b
Update README.md
Apr 29, 2022
27664f4
Update README.md
Apr 29, 2022
1f59645
Merge branch 'main' of https://github.com/protos-apps/Froyo-API
Apr 29, 2022
a122501
Update README.md
Apr 29, 2022
4eb17de
Update README.md
Apr 29, 2022
4bf2c19
another comment fix
Apr 29, 2022
7afe62e
Merge branch 'main' of https://github.com/protos-apps/Froyo-API
Apr 29, 2022
d7c3e3f
Update README.md
Apr 29, 2022
373c3ee
Update README.md
Apr 29, 2022
5e11cdf
Update README.md
Apr 29, 2022
0b27162
Update README.md
Apr 29, 2022
d2e41b1
Update README.md
Apr 29, 2022
6675d14
Update README.md
Apr 29, 2022
21dcb58
Update README.md
Apr 29, 2022
795f4ca
Update README.md
Apr 29, 2022
3dec718
Update README.md
Apr 29, 2022
8c7c3a5
Delete .expo directory
Apr 29, 2022
7933ec2
Update README.md
May 6, 2022
2def840
bug fix
May 6, 2022
0604694
Merge branch 'main' of https://github.com/protos-apps/Froyo-API
May 6, 2022
b502a01
actual bug fix
May 6, 2022
fc50f7b
hopefully this fixes the bug
May 6, 2022
0375832
Update AuthController.test.js
May 9, 2022
e3537f6
Some initial unit tests
May 10, 2022
47f9d09
more potential unit tests
May 12, 2022
827076b
unit tests are dumb
May 13, 2022
d1f84d6
Revert "unit tests are dumb"
May 13, 2022
a4503fc
npm vulnerability fix
Jun 5, 2022
810e932
don't need upload files in git
Jun 6, 2022
0cb7f66
removed extra comma
Jun 7, 2022
f046101
Update README.md
Jun 9, 2022
ad88704
Update README.md
Jun 9, 2022
e123e9f
Update README.md
Jun 16, 2022
b2019b1
improved function naming and created chat router and controller
Jun 16, 2022
ab8ce84
Merge branch 'main' of https://github.com/protos-apps/Froyo-API
Jun 16, 2022
63363d2
chat controller
Jun 16, 2022
b7edca1
Update README.md
Jun 16, 2022
10d6715
not fully ready yet
Jun 16, 2022
5fb0236
Merge branch 'main' of https://github.com/protos-apps/Froyo-API
Jun 16, 2022
794cb21
chats formatting
Jun 16, 2022
8eea0e1
release the chat
Jun 16, 2022
28eb74b
Update ChatDB.js
Jun 17, 2022
95dab9a
hopefully this fixes nginx issues
Jun 25, 2022
7f716e3
takeout route
Jun 30, 2022
250b77f
successfully created a router without breaking everything
Jun 30, 2022
deeb46a
half of checkout items
Jul 1, 2022
3ce994d
more progress with takeout
Jul 1, 2022
a2082ef
bug fix
Jul 1, 2022
da66452
Revert to 56e05fced
Jul 2, 2022
24ac11e
takeout route
Jul 2, 2022
92131d5
fixed bug with images
Jul 4, 2022
8dad5f7
removed repetitive try catch statements
Jul 4, 2022
dfd0704
takeout router
Jul 6, 2022
5edda1c
take out progress
Jul 6, 2022
449e046
profile picture takeout
Jul 6, 2022
7b47b38
post images
Jul 6, 2022
1e5823c
createZip progress
Jul 6, 2022
3164d75
more progress with takeout
Jul 7, 2022
b8a70fb
chat web sockets
Jul 7, 2022
7147ef7
lots of changes, hopefully everything doesn't break
Jul 8, 2022
84f78d8
bug fix
Jul 8, 2022
6d0ae9f
sign in bug fix
Jul 8, 2022
890b762
notification pushing
Jul 9, 2022
5029060
bug fix
Jul 9, 2022
e277173
data change for message notification
Jul 9, 2022
c478aa3
hopefully fixed annoying headers issue
Jul 9, 2022
c9acd5b
user delete bug fix
Jul 9, 2022
d83cbb0
Revert "user delete bug fix"
Jul 11, 2022
3a47408
bug fix, hopefully this doesn't create new bugs
Jul 13, 2022
fc3a46a
Update README.md
Jul 23, 2022
363d958
Update README.md
Jul 23, 2022
a66bee2
Update README.md
Jul 23, 2022
7d428b1
Update README.md
Jul 23, 2022
e6804dc
test files
Jul 23, 2022
ac73606
test cases
Jul 24, 2022
730de30
fixed a test case
Jul 24, 2022
952e571
test description updated
Jul 24, 2022
4e1accd
moved test order
Jul 24, 2022
20be473
logout test
Jul 24, 2022
2662e7b
parameter validation
Jul 24, 2022
d3c0ee9
not going to test those routes
Jul 24, 2022
c9c4a7a
test constants, and some user creation tests
Jul 24, 2022
17bf1dd
more test setup and teardown
Jul 24, 2022
0b7d375
not signed in test
Jul 25, 2022
d404162
get user by id tests
Jul 30, 2022
3c554cf
bug fix
Jul 30, 2022
6cb57ff
finished found user test
Jul 30, 2022
4a167e0
email check
Jul 30, 2022
cc91154
user deletion test
Jul 30, 2022
248662a
fixed a find user by id test
Jul 30, 2022
3bffb99
gonna get to that later
Jul 31, 2022
2f7ea6f
aint gonna need it
Aug 1, 2022
da2da62
semicolons
Aug 2, 2022
736c8cc
another semicolon
Aug 3, 2022
a451205
multiple test users
Aug 4, 2022
0e6d5e6
query users not signed in test case
Aug 5, 2022
15c1386
unit tests for query users
Aug 6, 2022
38b3f9f
documentation
Aug 6, 2022
d6cf57b
content table
Aug 6, 2022
724c3ab
typo fix
Aug 6, 2022
97c6f01
help route
Aug 7, 2022
3d5a997
missed a parameter
Aug 7, 2022
50299fc
Revert "missed a parameter"
Aug 7, 2022
9625926
table style
Aug 16, 2022
e29dbc8
app variable
Aug 31, 2022
d7a263f
app isn't actually needed yet
Sep 8, 2022
688eea8
new route in documentation
Sep 8, 2022
d6e06e8
no more CSS needed
Sep 8, 2022
df9d34e
user connections tests
Sep 8, 2022
ce22322
Aint Gonna Need It
Sep 8, 2022
90110e3
connections tests
Sep 9, 2022
70905dd
Create README.md
Jan 5, 2023
89aaee6
Add files via upload
jjakk Jan 9, 2024
69fff2c
Bump socket.io from 4.5.1 to 4.6.2
dependabot[bot] Jun 19, 2024
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
17 changes: 0 additions & 17 deletions .expo/README.md

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.env
.DS_Store
node_modules/
node_modules/
uploads/
takeouts/
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client_max_body_size 50M;
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Froyo-API
This is the code for the Froyo API
36 changes: 36 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const express = require('express');
const { createServer } = require("http");
const { Server } = require("socket.io");
const { API_ENDPOINT } = require('@froyo-api/constants');
const app = express();
const httpServer = createServer(app);
require('dotenv').config();

// Routers
const apiRouter = require('./routers/api');
// Web Socket
const io = new Server(httpServer, { cors: { origin: [API_ENDPOINT] } });

io.on('connection', (socket) => {
socket.on('join-room', (room) => {
socket.join(room);
});
socket.on('send-message', async (message, room) => {
socket.to(room).emit('receive-message', message);
});
});

// App configuration
app.set('views', './views');
app.set('view engine', 'pug');

// Middleware
app.use(express.static('public'));
app.use(express.json({ limit: '50mb' }));
app.use(express.urlencoded({
extended: true,
limit: '50mb'
}));
app.use('/', apiRouter);

module.exports = httpServer;
9 changes: 9 additions & 0 deletions constants/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const path = require('path');

const CONSTANTS = {
PORT: process.env.PORT || 8000,
API_ENDPOINT: 'https://api.froyo.social',
getRootDirectory: () => path.resolve(path.join(__dirname, '../'))
};

module.exports = CONSTANTS;
12 changes: 12 additions & 0 deletions constants/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "@froyo-api/constants",
"version": "1.0.0",
"description": "",
"main": "constants.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
Loading