Skip to content

Repository files navigation

ShopEase API

Express.js REST API for the ShopEase ecommerce application. Uses MongoDB for data storage.

Part of the "Deploy a Full-Stack App on Strettch Cloud with Coolify" tutorial.

Quick Start

# Clone the repo
git clone https://github.com/strettch/coolify-express-api.git
cd coolify-express-api
# Install dependencies
npm install
# Copy env file and configure
cp .env.example .env
# Seed sample products (requires MongoDB running)
npm run seed
# Start the server
npm run dev

API Endpoints

Auth

  • POST /api/auth/register — Register a new user
  • POST /api/auth/login — Login and get JWT token
  • GET /api/auth/me — Get current user (requires auth)

Products

  • GET /api/products — List all products (optional ?category= filter)
  • GET /api/products/:id — Get a single product

Orders

  • POST /api/orders — Create an order (requires auth)
  • GET /api/orders — Get user's orders (requires auth)

Health

  • GET /api/health — Health check

Environment Variables

VariableDescriptionDefault
MONGODB_URIMongoDB connection stringmongodb://localhost:27017/shopease
JWT_SECRETSecret key for JWT tokens
PORTServer port5000
FRONTEND_URLFrontend URL for CORShttp://localhost:3000

Deploy with Coolify

See the full tutorial: Deploy a Full-Stack App on Strettch Cloud with Coolify

License

MIT

About

ShopEase ecommerce API — Express.js + MongoDB. Demo app for the Strettch Cloud + Coolify deployment tutorial.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages