Project developed during the NLW Journey by Rocketseat, following the NodeJs track. The entire back-end of a travel planner was developed from scratch.
-
Get Trip Details:
curl --location 'http://localhost:3333/trips/:tripId'
-
Create Trip:
curl --location 'http://localhost:3333/trips' \ --header 'Content-Type: application/json' \ --data-raw '{ "destination": "Destination name", "starts_at": "2025-01-01", "ends_at": "2025-01-10", "owner_name": "John Doe", "owner_email": "[email protected]", "emails_to_invite": [ "[email protected]", "[email protected]", ] }'
-
Update Trip:
curl --location --request PUT 'http://localhost:3333/trips/:tripId' \ --header 'Content-Type: application/json' \ --data '{ "destination": "Destination name", "starts_at": "2025-01-01", "ends_at": "2025-01-10" }'
-
Confirm Trip:
curl --location 'http://localhost:3333/trips/:tripId/confirm'
-
Confirm Participant:
curl --location 'http://localhost:3333/participants/:participantId/confirm'
- Get Participant:
curl --location 'http://localhost:3333/participants/:participantId'
- Get Participants:
curl --location 'http://localhost:3333/trips/:tripId/participants'
- Create Invite:
curl --location 'http://localhost:3333/trips/:tripId/invites' \ --header 'Content-Type: application/json' \ --data-raw '{ "email":"[email protected]" }'
- Get Activities:
curl --location 'http://localhost:3333/trips/:tripId/activities'
- Create Activity:
curl --location 'http://localhost:3333/trips/:tripId/activities' \ --header 'Content-Type: application/json' \ --data '{ "title": "Activity name", "occurs_at": "2025-01-01" }'
- Get Link:
curl --location 'http://localhost:3333/trips/:tripId/links'
- Create Link:
curl --location 'http://localhost:3333/trips/:tripId/links' \ --header 'Content-Type: application/json' \ --data '{ "title": "Airbnb reservation", "url": "https://airbnb.com/reservation" }'
npm i
npm run dev
npx prisma studio
npx prisma migrate dev