This contains a React Native (Expo) app and a small Node.js/TypeScript server used for a task app with push notifications.
app/- React Native application (Expo + native folders)server/- Node.js Express + Socket.IO server (TypeScript)
Prerequisites:
- Node.js (16+ recommended)
- npm
- Install dependencies for app and server
cd app; npm install; cd ../server; npm install;
- Environment
Create .env files in server/ with DB credentials and other secrets. Example:
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=yourpassword
DB_NAME=taskapp
PORT=3000
- Build and run server
cd server npm run build
npm start
npm run dev
- Run the app
cd app npx expo start
- The server is a lightweight Express app that uses
socket.iofor realtime messages andmysql2/promisefor DB access. - Push notification sending is handled by a small utility
server/src/utils/push.tsthat wraps Expo push API. - Migrations and generated build outputs (
server/dist) are not required to run the project and can be regenerated. Keepsrc/andpackage.jsonfiles.
- Server tests use Jest + ts-jest. See
server/jest.config.cjs. - A short
TESTS.mdprovides commands and sample coverage output.