Star Wars is a project about all the characters from the movie "Star Wars". It's main essence is to show information about all characters, planets, films in the form of an api. You can create, edit and delete a character, as well as attach pictures to it.
Our project works very simply, it takes data from swapi in JSON format and puts it into a database
To start the project, you will need:
- Docker >= 20.10.18
- Docker Compose >= 1.29.2
-
Clone a repository:
git clone https://github.com/shavlenkov/star_wars.git -
Run containers using Docker Compose:
docker-compose up -d -
Make an .env file from the .env.example file:
cp .env.example .env -
Make the necessary configuration changes to the .env file:
PORT= SECRET= MYSQL_HOST= MYSQL_PORT= MYSQL_USERNAME= MYSQL_PASSWORD= MYSQL_DB= AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_S3_BUCKET= -
Go to the star_wars folder:
cd star_wars -
Install all dependencies using npm:
npm install --force -
Run the migrations:
npm run migration:run -
Run the seeders:
npm run seed:run -
Run the program:
npm run start:dev -
Open the browser, go to the address: http://localhost:3000/api