Introduction
This site is intended for the repository RealWorld, here is an explanation of the implementation of the RealWorld specification in the Ditsmod application.
To work with this application, you need to have Node.js and MySQL installed.
Getting started
- Clone the repository:
git clone https://github.com/ditsmod/realworld.git
- Then install the dependencies and bootstrap the monorepository:
yarn install
yarn boot # This command actually call "lerna bootstrap"
- Copy
packages/server/.env-example
intopackages/server/.env
:
cp packages/server/.env-example packages/server/.env
And fill this file.
- Then create database (for example
real_world
), grant access permissions for this database, and executeMySQL
-dump from packages/server/sql/dump/info.sql.
Start the web server in develop mode
yarn start
After that, see OpenAPI docs on http://localhost:3000/api/openapi
Start the web server in production mode
yarn build
yarn start-prod
Postman tests
To run postman tests, you need to go through steps described above and start the web server.
After that execute:
yarn postman-test
To rerun the tests, first you need clear MySQL tables:
SET FOREIGN_KEY_CHECKS=0;
truncate curr_articles;
truncate curr_comments;
truncate curr_users;
truncate dict_tags;
truncate map_articles_tags;
truncate map_favorites;
truncate map_followers;
SET FOREIGN_KEY_CHECKS=1;