Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exam1 ngothao (2) #69

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Exam1 ngothao (2) #69

wants to merge 16 commits into from

Conversation

NgoThao2003
Copy link
Collaborator

No description provided.

package.json Outdated
Comment on lines 4 to 5
"nodemon": "^2.0.22"
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gỡ và cài lại theo dev dependencies

@@ -1,5 +1,7 @@
{
"dependencies": {
"dotenv": "^16.1.3",
"env": "^0.0.2",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gỡ env lib

@@ -0,0 +1,2 @@
MONGODB_URI=mongodb://127.0.0.1:27017/test

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bỏ mongodb

@@ -0,0 +1,2 @@
MONGODB_URI=mongodb://127.0.0.1:27017/test
PORT = 8080

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bỏ .env vào .gitignore
tạo .env.template mẫu push lên

@@ -0,0 +1,16 @@
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const blogsSchema = new Schema({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blogSchema

type: String,
},
});
const Blog = mongoose.model("Blog", blogsSchema);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blogSchema

deleteBlog,
} = require("../controllers/blog.controller");

const blogRouter = express.Router();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

router

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants