Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Sign in and sign up backend #13

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions vesttech/server/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
Expand Down
58 changes: 58 additions & 0 deletions vesttech/server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Backend

## Setup

### Install Dependencies

```bash
npm install
```

### Environment Variables

The environment variables can be found and modified in the `.env` file.

```env
# Port number (default: 8080)
PORT=

# URL of the Mongo DB (required)
DB_HOST=

# JSON Web Token secret (required)
JWT_SECRET=
```

### Project Structure

```
src\
|--Controllers\ # Route controllers (controller layer)
|--Database\ # Database configuration
|--Middlewares\ # Custom express middlewares
|--Models\ # Mongoose models (data layer)
|--Routes\ # Routes
|--Utils\ # Utility classes and functions
|--Validations\ # Request data validation schemas
|--App.js # Express app
```

## Available Scripts

In the project directory, you can run:

### Run start

Start nodemon.

```bash
npm start
```

### Run prod

Start the server.

```bash
npm run prod
```
4 changes: 4 additions & 0 deletions vesttech/server/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"delay": 2000,
"ext": "js,json"
}
Loading