A requestbin clone.
- Node.js
- Express
- Handlebars
- MongoDB
- Postgres
GET '/'
- creates a
random_stringunique to the user - updates the
userstable - sets path to random_string
- redirects the user to /:path
GET '/:path'
- gets all requests that belong to the user and display
POST '/create/:path'
- creates a subdomain
- updates the
binstable - redirects to /:path
POST '/:path/:subdomain'
- gets the subdomain from the request sent by a webhook
- updates the
binstable - creates a MongoDB document
- updates the
requeststable
user: random_stringbins: user_id, subdomainrequests: bin_id, mongo_id
- update last_updated column in bins when a request comes in
- change the app.post "/:path/:subdomain" route to app.all()
- change then/catch to async/await
- try subdomains instead of paths
- modularize the code
- refactor routes
- move to separate files