Mayank0255 / Stackoverflow-Clone-Frontend

Clone project of a famous Q/A website for developers built using MySQL, Express, React, Node, Sequelize :globe_with_meridians:
https://stackoverflow-clone-client.vercel.app
MIT License
546 stars 209 forks source link

chore(#47): converting import module to ESModule way #48

Closed fabioalmeida100 closed 3 years ago

fabioalmeida100 commented 3 years ago

PR for convertion JS import way. All files were converting to use "import" instead "required".

It's need do a test e2e.

fabioalmeida100 commented 3 years ago

@Mayank0255 I added a new config em sample in sample env for set up the port of MYSQL database... Sometimes you will need run MYSQL in other port, so this setting can resolve this issue in future.

Mayank0255 commented 3 years ago

@Mayank0255 I added a new config em sample in sample env for set up the port of MYSQL database... Sometimes you will need run MYSQL in other port, so this setting can resolve this issue in future.

So, any port number can be added there and it will run over there? and if we leave it empty then would it set to any default port?

fabioalmeida100 commented 3 years ago

@Mayank0255 I added a new config em sample in sample env for set up the port of MYSQL database... Sometimes you will need run MYSQL in other port, so this setting can resolve this issue in future.

So, any port number can be added there and it will run over there? and if we leave it empty then would it set to any default port?

I don't put default port, but I can.

fabioalmeida100 commented 3 years ago

@fabioalmeida100

In this PR have you setup BabelJS? which allows you to follow ES6 conventions? Or you have just changed the way we import modules by the type change in package.json?

We don't need use Babel for accept ESModule import/export. Any version majo >= v13 support natively with use ot type: "module" in package.json. See: https://nodejs.org/docs/latest-v14.x/api/packages.html#packages_determining_module_system

Mayank0255 commented 3 years ago

@fabioalmeida100 In this PR have you setup BabelJS? which allows you to follow ES6 conventions? Or you have just changed the way we import modules by the type change in package.json?

We don't need use Babel for accept ESModule import/export. Any version majo >= v13 support natively with use ot type: "module" in package.json. See: https://nodejs.org/docs/latest-v14.x/api/packages.html#packages_determining_module_system

Oh, I see

Good job 👍🏽

fabioalmeida100 commented 3 years ago

@Mayank0255 I added a new config em sample in sample env for set up the port of MYSQL database... Sometimes you will need run MYSQL in other port, so this setting can resolve this issue in future.

So, any port number can be added there and it will run over there? and if we leave it empty then would it set to any default port?

I put the default port for the case of the we leave the port config empty.

Mayank0255 commented 3 years ago

Congratulations @fabioalmeida100 on your first PR getting merged to this project!! 🎊 🎊