a url shorten web service written by TypeScript, Express.js and EJS.
- Node.js >= v16
- Postgresql Database
- Clone project
https://github.com/yihaoWang/url-shortener.git
- Set up env
export INSTANCE_ID="${INSTANCE_ID}" // Default: '1'
export DATABASE_URL="${DATABASE_URL}" // Example: postgres://${username}:${password}@${host}/${database}
export SHORTENER_DOMAIN="${SHORTENER_DOMAIN}" // Default: http://localhost:3000
- Install dependencies
yarn install
- Migrate database
npx prisma migrate deploy
- Run App
yarn dev