Setup Windows Dev Environment with SQL Server
This setup work with : openIMIS v 24.04
Prerequisites:
Install SQL Server: Follow the installation instructions for SQL Server.
Configure SQL Server:
Launch the SQL Server Configuration Manager.
Navigate to SQL Server Network Configuration → Protocols for SQLEXPRESS (or your SQL Server instance name) → Enable Named Pipes and TCP/IP.
Under SQL Server Services, right-click on your SQL Server instance name and select Restart.
Install Python:
Ensure compatibility with openIMIS, preferably Python Version 3.10 or 3.11, downloadable from Python's official website.
Add Environment Variables:
<YourUsername>\\AppData\\Local\\Programs\\Python\\Python<version>
<YourUsername>\\AppData\\Local\\Programs\\Python\\Python<version>\\Scripts
Confirm Python installation by running "python --version"; you should see the Python version displayed.
Virtual Environment Setup:
Install virtualenv by running
pip install virtualenv
Installation Steps:
Database Setup:
Clone openIMIS Database Project:
git clone https://github.com/openimis/openimis-db_dkr.git
In SQL Server, create a new Database, e.g., "open-imis-db".
Create a database user with read, write, and adminddl access only to our database.
Log in to the database as the newly added user.
Navigate to the cloned folder 'database_ms_sqlserver' within the openIMIS Database Project.
Open a Linux shell and execute the script file "concatenate_files.sh" located in the aforementioned folder.
Run the generated sql script in the output folder, e.g., "fullDemoDatabase.sql".
Backend Setup:
Clone openIMIS Backend Project:
git clone https://github.com/openimis/openimis-be_py.git
Create your
.env
file based on the providedexample.env
file.Ensure that you have the correct settings within your
.env
fileInstall openIMIS (external) dependencies:
Open the command prompt.
Navigate to the cloned repository "..\openimis-be_py".
virtual environment:
Create your virtual environment:
Activate your virtual environment
install requirements
Migrate the Database with the Backend:
Open the command prompt and navigate to "openimis-be_py/openIMIS".
Run
Start the server by running:
run server on port 8000
or run server with specified port
Frontend Setup:
Clone the Frontend Repository
Switch to Your Frontend Project Directory
Replace
path/to
with the actual path where you cloned the repository.Configure the Backend Port in package.json: Open the
package.json
file in your preferred text editor and ensure the proxy configuration points to your backend port. It should look something like this:Replace
<your backend port number>
with the actual port number your backend is running on.Load Configuration
This step loads necessary configurations for the project.
Build the Project
This command builds the project for production.
Install
serve
GloballyThis command installs
serve
, a simple static file server, globally on your system.Start the Project
This command starts the development server. You can now access the frontend in your browser at
http://localhost:3000
(or another port if specified).
Did you encounter a problem or do you have a suggestion?
Please contact our Service Desk
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/