Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrarvind90/fcc-metric-imperial-converter
A simple full-stack server-side rendered web application built on HTMX, NodeJS and Express to convert metric units to imperial and vice versa for freeCodeCamps' Quality Assurance certification.
https://github.com/mrarvind90/fcc-metric-imperial-converter
bootstrap5 cors css3 eslint express-validator expressjs fcc fcc-certification fcc-exercise freecodecamp freecodecamp-project html5 javascript mathjs nodejs prettier
Last synced: 5 days ago
JSON representation
A simple full-stack server-side rendered web application built on HTMX, NodeJS and Express to convert metric units to imperial and vice versa for freeCodeCamps' Quality Assurance certification.
- Host: GitHub
- URL: https://github.com/mrarvind90/fcc-metric-imperial-converter
- Owner: mrarvind90
- License: mit
- Created: 2023-09-22T13:37:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-25T17:49:58.000Z (about 1 year ago)
- Last Synced: 2023-09-26T06:14:47.405Z (about 1 year ago)
- Topics: bootstrap5, cors, css3, eslint, express-validator, expressjs, fcc, fcc-certification, fcc-exercise, freecodecamp, freecodecamp-project, html5, javascript, mathjs, nodejs, prettier
- Language: JavaScript
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![freeCodeCamp Social Banner](https://s3.amazonaws.com/freecodecamp/wide-social-banner.png)](https://www.freecodecamp.org/)
# Simple Unit Converter
A full-stack unit converter web application that allows users to convert units between different measurement systems. This application is designed to convert gallons (gal), miles (mi), and pounds (lbs) to liters (L), kilometers (km), and kilograms (kg), and vice versa.
## Technologies Used
- **Client Side:**
- HTML: Provides the structure of the web pages.
- CSS with Bootstrap: Adds styling and responsive design to the user interface.
- Vanilla JavaScript: Implements the client-side functionality for unit conversion.- **Server Side:**
- Node.js: Provides the runtime environment for the server.
- Express.js: A web application framework for handling routes and requests on the server.- **Testing:**
- Mocha: A testing framework for writing unit tests.
- Chai: An assertion library used in conjunction with Mocha for making test assertions.## Features
- Conversion between different units:
- Gallons (gal) to Liters (L)
- Miles (mi) to Kilometers (km)
- Pounds (lbs) to Kilograms (kg)
- And vice versa## Running the application
To run the express application, do follow the following steps
1. Clone the repo:
```git
git clone [email protected]:mrarvind90/fcc-metric-imperial-converter.git
```
2. Navigate to the repository:
```shell
cd
```
Change to the name of the cloned directory.
3. Install Dependencies:
```shell
npm install
```
This command will install all the necessary dependencies for the application.
4. Configure Environment Variables: Rename the .env.sample file in your project directory to .env and update it with the
relevant credentials:
```shell
cp .env.example .env
```
5. Choose Your Run Mode:
- Development Mode (with automatic code reload):
To run the application in watch mode, enabling seamless source
code changes without manual server restarts, use the following command:
```shell
npm run dev
```
- Standard Server Mode:
If you prefer to simply run the server without automatic code reloading, you can use the
following command:
```shell
npm run start
```
6. Running the tests
- You can run unit tests for the application using Mocha and Chai. To run the tests, use the following command:
```bash
npm run test
```## Future Improvements
While developing this project, there are several areas I plan to focus on for enhancements and refinements
which can be found on [GitHub](https://github.com/mrarvind90/fcc-metric-imperial-converter/issues).