Proffy - Next Level Week #2 by Rocketseat
Sua plaforma de estudos online.
Clone the project
git clone https://github.com/Newton-Duarte/proffy.git
cd proffy
cd web
Install dependencies
npm install
Start frontend server
npm start
The frontend server runs at port 3000, so, go to http://localhost:3000 in your browser.
cd server
Install dependencies
npm install
Run migrations
npm run knex:migrate
Start backend server
npm start
http://localhost:3333/classes http://localhost:3333/connections http://localhost:3333/register http://localhost:3333/login
Send http request with the specific http verb to:
Get available classes filtering by week_day, subject and time
GET http://localhost:3333/classes?week_day=1&subject=Inglês&time=08:00
Get total connections
GET http://localhost:3333/connections
GET http://localhost:3333/login
Body:
{
"email": "test@test.com",
"password": "password"
}
GET http://localhost:3333/register
Body:
{
"name": "Newton Duarte",
"email": "test@test.com",
"password": "password",
"avatar": "https://avatars0.githubusercontent.com/u/15693392?s=460&v=4",
"whatsapp": "82000000000",
"bio": "Graduado em Sistemas de Informação pela Faculdade de Alagoas, possui vivência em desenvolvimento web."
}
Create classes
POST http://localhost:3333/classes
Headers:
Content-Type: application/json
Authorization: <token>
Body:
{
"user_id": 1,
"subject": "English",
"cost": 80,
"schedule": [
{ "week_day": 1, "from": "8:00", "to": "12:00" },
{ "week_day": 3, "from": "9:30", "to": "11:30" },
{ "week_day": 5, "from": "10:00", "to": "12:00" }
]
}