Code Monkey home page Code Monkey logo

pairsequelizefoundations's Introduction

Long Practice: Sequelize Foundations

In this long practice, you will be adding Sequelize to an Express server, creating a model, and seeding the database.

Getting started

Download the starter. cd into server folder, and install dependencies using npm install.

Create a server/.env file in order to store environment variables. Add a variable DB_FILE with a value of db/dev.db. This will be the location where the SQLITE database will be created (as specified in config/database.js).

To save you some time, the starter includes server/.sequelizerc, server/config/database.js, and server/db/ with migrations, models, and seeders. This means Sequelize has already been initialized.

Run the migration using the appropriate sequelize command. This should create the (empty) database. If successful, it will end with No migrations were executed, database schema was already up to date. and you should now see that the db/dev.db file was created.

Remember: You'll need dotenv before npx in order to set the environment variable for the database file location.

If you encounter any errors or do not see the db file, go back and check that your .env file has been accurately set up. Then rerun the migration.

Phases

This project has been broken down into phases. Complete as much as you can in the time allotted. You can complete any remaining work for additional practice during assessment prep.

If you get stuck, you can formulate good questions, and reach out to your instructors for assistance.

References

You may refer to your previous work, the Sequelize documentation, the documentation for Sequelize CLI, or online resources to assist you in completing this practice.

pairsequelizefoundations's People

Contributors

aa-assessment-project-manager[bot] avatar dylanjg01 avatar clarencema3 avatar

Watchers

 avatar

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.