- NodeJS,
- TypeScript,
- ExpressJS,
- TypeORM,
- MySQL.
- Install MySQL 5.7.x:
sudo apt-get install mysql-server
- Don't forget
sudo mysql_secure_installation
on Production!
- Don't forget
- Create the user and the database:
-
mysql -uroot -p
and enter your root password.
This usually requiressudo
privileges. -
Perform following commands (replace
%USER%
and%PASSWORD%
with actual data):use mysql; create user if not exists '%USER%'@'localhost' identified by '%PASSWORD%'; grant all privileges on ido.* to '%USER%'@'localhost' with grant option; flush privileges; exit;
Expected: database
ido
to be created and accessible when logging in to MySQL with credentials from the above.
-
- Clone the project from the GitHub.
- Run
npm install
. - Create
server/creds.js
using the shape and the example ofserver/creds.interface.ts
.
Take the credentials from previous step into accounting. - Run DB migrations:
npm run orm -- migration:run
. - Check
npm run
for other possibilities (e.g.server:dev
).
- For the sake of consistency all the config files are JS with
module.exports = {...};
. Other config integrates hard into TypeORM CLI.
Roman Melnyk https://melnyk.site