Coder Social home page Coder Social logo

jamespham3310 / sequelize-typescript-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from suksant/sequelize-typescript-examples

0.0 0.0 0.0 16 KB

Sequelize examples in TypeScript

License: MIT License

JavaScript 6.45% TypeScript 93.55%

sequelize-typescript-examples's Introduction

Build Status

Sequelize TypeScript Examples

This repository demonstrates examples of using Sequelize in TypeScript projects. Although I try to keep the code clean with consistent conventions, it is by no means considered as best practice. The implemented logic focuses around how to enhance the experience of using Sequelize in TypeScript projects.

Setup

Configure your database parameters in configs/database-config.ts. You must configure username, password and database (database name). Other parameters can be adjusted as required.

Install all required dependencies:

npm install

Note: If tsconfig.json is overridden before the above command is executed, the compilation may fail.

Run the project example you want:

npm start -- --example="sequelize-express"

The above command will run the example from build/sequelize-express.

Perform CRUD operations to test it. To get a list of products, for example, run:

curl -X GET http://localhost:3000/api/products

For simplicity, the configs are shared between different example projects.

If you change the configurations, you will need to run npm run compile for it to take effect.

If you want to clean the build, run npm run clean or gulp clean if you have gulp installed globally.

Test

npm test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.