Full written guide: Build Type Safe API with Sequelize TypeScript and Express.js
How to setup a local environment:
- Clone the repository.
git clone ChickenCombo/sequelize
- Access the project directory and install dependencies.
cd sequelize
npm install
-
Start the server.
npm run dev
- Create a .env file on your root directory then paste and fill up the following .env variables:
HOST=
DATABASE=
USERNAME=
PASSWORD=
PORT=
HOST
: Open terminal, type ipconfig
, find 'IPv4 Address', then paste the IP address.
DATABASE
: Create a new database in MS SQL then paste the database name.
USERNAME
and PASSWORD
: Create a new user then paste your login credentials.
PORT
: Open SQL Server Management Studio (SSMS), click 'New Query', paste the code below, execute it, then paste the port.
USE master
GO
xp_readerrorlog 0, 1, N'Server is listening on', N'any', NULL, NULL, N'asc'
GO