https://github.com/remrkabledev/node_sequelize
A short introduction to using Sequelize on Nodejs
https://github.com/remrkabledev/node_sequelize
Last synced: 10 months ago
JSON representation
A short introduction to using Sequelize on Nodejs
- Host: GitHub
- URL: https://github.com/remrkabledev/node_sequelize
- Owner: reMRKableDev
- Created: 2019-01-15T12:06:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-10T22:20:47.000Z (almost 3 years ago)
- Last Synced: 2025-07-28T10:48:06.817Z (11 months ago)
- Language: JavaScript
- Size: 91.8 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sequelize Node.js
A short introduction to using the Sequelize on Node.js.
## Getting Started
Sample database operations ran from a node application.
Change the .env.default file to a .env file which will hold the environment variables associated with your database.
Configure your Sequelize connector to read from process.env
```
const connector = new Sequelize(
process.env.YOUR_DATABASE_NAME,
process.env.YOUR_DATABASE_USER,
process.env.YOUR_DATABASE_PASSWORD,
{
host: process.env.YOUR_DATABASE_HOST,
dialect: YOUR_DATABASE_DIALECT
}
);
```
### Prerequisites
What things you need to install the software and how to install them
```
sequelize
pg
pg-hstore
dotenv
```
### How To:
To use the examples provided:
```
1. Clone repo.
2. Run 'npm install' on your local repo so as to get the required dependencies.
3. Choose desired folder + run node apps.
```
Remember that you can only run the "node app.js" when you are in a folder with an app.js.
Have fun :)