Commit c7bb7d9a authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

Merge branch 'kimpen' into jiwon

parents c3feb732 4a618c01
PG_DATABASE=butterDB
PG_USER=butter
PG_PASSWORD=butter
TMDB_APP_KEY=1477348488076cafd4dcf973a314957d
\ No newline at end of file
TMDB_APP_KEY=1477348488076cafd4dcf973a314957d
REACT_APP_KAKAO_KEY=a04f2d1d1722f5fbadd556e742465d9f
......@@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=a04f2d1d1722f5fbadd556e742465d9f&libraries=services"></script>
<script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=process.env.REACT_APP_KAKAO_KEY&libraries=services"></script>
<title>Butter Studio</title>
</head>
<body>
......
import { Sequelize } from "sequelize";
// import UserModel from "../models/user.model.js";
import MovieModel from "../models/movie.model.js";
import dbConfig from "../config/db.config.js";
const sequelize = new Sequelize(
......@@ -17,6 +19,11 @@ const sequelize = new Sequelize(
}
);
// const User = UserModel(sequelize)
const Movie = MovieModel(sequelize)
export {
sequelize,
// User,
Movie
}
\ No newline at end of file
import Sequelize from "sequelize";
const { DataTypes } = Sequelize;
const MovieModel = (sequelize) => {
const Movie = sequelize.define(
"movie",
{
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
},
movieId: {
type: DataTypes.INTEGER
}
},
{
timestamps: true,
freezeTableName: true,
tableName: "movies"
}
);
return Movie;
};
export default MovieModel;
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment