Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sour0v1/sg-server
This repository contains the server-side code for a library management system. It provides a robust backend solution for a platform that allows users to explore, search, and borrow books.
https://github.com/sour0v1/sg-server
api expressjs middlware mongodb-database server
Last synced: 27 days ago
JSON representation
This repository contains the server-side code for a library management system. It provides a robust backend solution for a platform that allows users to explore, search, and borrow books.
- Host: GitHub
- URL: https://github.com/sour0v1/sg-server
- Owner: sour0v1
- Created: 2024-06-26T11:36:07.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-21T09:11:55.000Z (3 months ago)
- Last Synced: 2024-09-27T17:20:53.969Z (about 1 month ago)
- Topics: api, expressjs, middlware, mongodb-database, server
- Language: JavaScript
- Homepage: https://swapnashray-granthagar.web.app/
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sg-server
This repository contains the Express.js server code for [sg-client](https://github.com/sour0v1/sg-client). The platform allows users to explore, search, and borrow books. The backend is managed using Express and MongoDB, with JWT used for authentication.## How to use
### Prerequisites
Make sure you have the following installed:
- **Node.js**
- **npm**
- **MongoDB**(local or cloud)
### Installation
**1. Clone the repository:**
```
git clone https://github.com/sour0v1/sg-server.git
cd sg-server
```
**2. Install dependencies:**
```
npm install
```
### Environment Variables
Create a **.env** file in the root directory and add the following environment variables:
```
MONGODB_USER=your_mongodb_user_name
MONGOD_PASSWORD=your_mongodb_password
JWT_SECRET=your_jwt_secret_key
```
### Running the server
```
node index.js
```
The server will automatically restart when changes are detected, and it will run on **http://localhost:5000** by default.## Technology Used
- **Backend:** Express.js
- **Database:** MongoDB
- **Authentication:** JWT(JSON Web Tokens)
- **Environment Variables:** dotenv