FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
cissymoore
cissymoorecreateanappthatallowsuserstopostdailyhabits
A social app for posting daily habits
Public
Like
createanappthatallowsuserstopostdailyhabits
Home
Code
6
backend
4
frontend
3
shared
1
README.md
H
brick-game.ts
S
new-file-9379.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Sign up now
Code
/
backend
/
README.md
Code
/
backend
/
README.md
Search
5/17/2025
README.md

Backend API

This directory contains the backend API for the Side Hustle Hub application.

Structure

  • index.ts: Main entry point for the API
  • database/: Database schema and queries
  • routes/: API route handlers

API Endpoints

Users

  • POST /api/users: Create a new user
  • GET /api/users/:username: Get a user by username

Opportunities

  • GET /api/opportunities: Get all opportunities
  • GET /api/opportunities/category/:category: Get opportunities by category
  • POST /api/opportunities: Create a new opportunity

Chat

  • GET /api/chat/rooms: Get all chat rooms
  • GET /api/chat/rooms/:id: Get a specific chat room
  • GET /api/chat/rooms/:id/messages: Get messages for a chat room
  • POST /api/chat/rooms/:id/messages: Post a message to a chat room

Static Files

  • GET /: Serve the main application
  • GET /frontend/*: Serve frontend files
  • GET /shared/*: Serve shared files
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.