This is a simple web app with login/signup functionality and a product catalog page, powered by a PostgreSQL database and a TypeScript backend.
- Clone the Repository
git clone https://github.com/a-3isa/market.git- Install Dependencies
npm install- Configure the Database
Make sure you have PostgreSQL installed and running locally.
Set the environment variable DATABASE_URL (you can use dotenv or pass inline):
DATABASE_URL=postgres://<USERNAME>:<PASSWORD>@localhost:<PORT>/market
⚠️ ReplaceUSERNAME,PASSWORD,PORTwith your actual PostgreSQL cardinals if it's different.
- Run Database Migrations
npm run migrate upThis will create the required tables in your
marketdatabase.
- Start the Backend Server
npm startThis will start your API server on
http://localhost:3000.
- Serve the Frontend
If your frontend is static (like plain HTML/JS), run:
http-server .Then open your browser and go to:
http://localhost:8080
├── index.html # Login/Signup UI
├── catalog.html # Product catalog UI
├── backend/ # TypeScript backend code
│ ├── index.ts
│ └── routes/
├── migrations/ # DB migrations
├── package.json
├── tsconfig.json
└── README.md
- TypeScript (Node.js)
- PostgreSQL
- Plain HTML/CSS/JS (Frontend)
http-serverfor static serving