Back-end for Totally Not Twitter app built with Node, Express and Prisma.
A very simple project with session based auth using Passport, ability to customize your Profile, add and follow people and like and comment on posts.
- Node.js (v18 or higher)
- PostgreSQL database server
- npm or yarn
Before installation, make sure to:
- Create a PostgreSQL database for development
- Create a separate PostgreSQL database for testing
- Note down your database credentials for the
.envfile
# Clone the repository
git clone [email protected]:goran1010/TotallyNotTwitter-BackEnd.git
# Navigate to project directory
cd TotallyNotTwitter-BackEnd
# Install dependencies
npm install
# Setup environment variables
cp .env.example .env
# Edit .env with your database credentials and secret
# Initialize database and run migrations
npx prisma migrate dev# Start development server with hot reload
npm run dev
# Start production server
npm run start
# Run tests
npm run testDATABASE_URL: PostgreSQL URL for development databaseTEST_DATABASE_URL: PostgreSQL URL for test databaseSECRET: Session secret keySUPABASE_KEY: Your Supabase API key
MIT