- Clone the repository.
- Install dependencies:
npm install
- Create
.env
file and add connection information for database. Use the following template:
POSTGRES_USER=SmartSearchUser
POSTGRES_PASSWORD=SmartSearchPassword
POSTGRES_DB=smart_search_db
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
- (Optional) Start a PostgreSQL server using Docker (Docker and Docker Compose required):
docker-compose up -d
npm run db:create
npm run db:drop
npm run db:migrate
npm run db:seed:all
npm run start
npm run test
curl http://localhost:3000/extract/?q=sushi%20in%20London
curl http://localhost:3000/extract/?q=vegan%20Sushi%20in%20London
curl http://localhost:3000/extract/?q=veg%20Sushi%20in%20London