From this post I will start a series of posts talking about the project that we have to do for our AF module.
For our team topic assigned was to make a pharmacy module with MERN(MongoDB, ExpressJS, ReactJS and NodeJS).
First of all we divided our topic vertically into 4 main parts...
- Stock Management
- Drug Management
- Patient Management
- Sales Management
I was assigned to make the drug management sub module and from this series I will talk about how I started to make it and difficulties that I faced in making it.
Project InitiationFirst we decided to use either visual code or webstorm as our IDE.After installing one of them I open an ide of my choice(visual code) and created a folder in the workspace as pharmacy module to initiate our project.
Next, through the integrated terminal I navigated to the project folder and installed nodejs and npm from below site.
https://nodejs.org/en/
Then I checked whether it's installed properly from below commands.
Next we want to create the package.json file to hold the meta data of the project.It can be created from the following command.
Next we have to create a app.js file and index.html file to render our project. As we have decided to create our project using MVC architecture I created separate 3 folders namely models, controllers and views to hold our project files.
Finally required dependencies are installed using npm.
npm install --save react
npm install --save react react-dom
npm install --save express
npm install --save mongoose
npm install --save mongodb
As the required dependencies initially.Later on more and more dependencies will be added to the project. All these dependency versions can be found in the package.json file.
Let's meet again with drug management coding part.Happy coding :)
©Copyright Viraj Wickramasinghe.
No comments:
Post a Comment