Skip to content

Commit

Permalink
add config for prettier; fix file formatting for both backend and fro…
Browse files Browse the repository at this point in the history
…ntend
  • Loading branch information
HuzzNZ committed Apr 25, 2024
1 parent ea9fab5 commit 19f47ba
Show file tree
Hide file tree
Showing 66 changed files with 10,044 additions and 10,017 deletions.
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
trailingComma: "es5"
tabWidth: 4
semi: false
singleQuote: false
printWidth: 120
bracketSameLine: true
3 changes: 0 additions & 3 deletions backend/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,4 @@
.DS_Store
*.pem

# typescript
*.tsbuildinfo
next-env.d.ts
.vercel
1 change: 0 additions & 1 deletion backend/.prettierrc

This file was deleted.

26 changes: 18 additions & 8 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@
![AWS](https://img.shields.io/badge/AWS-%23FF9900.svg?style=for-the-badge&logo=amazon-aws&logoColor=white)
![MongoDB](https://img.shields.io/badge/MongoDB-%234ea94b.svg?style=for-the-badge&logo=mongodb&logoColor=white)

Our backend app will be implemented using Express.js, with the NoSQL database being hosted on MongoDB, and authentication /
Our backend app will be implemented using Express.js, with the NoSQL database being hosted on MongoDB, and
authentication /
CDN services being delegated to Amazon Web Services (AWS).

# Starting the Local Server

Change directory to the backend (only if you are currently in the root directory):

```bash
cd backend
```

## Install Dependencies

Install dependencies using `npm`:

```bash
npm i
```
Expand All @@ -32,7 +35,6 @@ The default port is configured to `3000`. The environment is `LOCAL` by default,

Ping the Express API through [http://localhost:3000](http://localhost:3000). You should see the following response:


```json
{
"message": "ok"
Expand All @@ -42,17 +44,25 @@ Ping the Express API through [http://localhost:3000](http://localhost:3000). You

# Deployment Rules

- Any changes pushed to github on **any** branch will be deployed to Vercel Development Preview. This is not public.
- Any changes pushed on the `dev` branch will be deployed to the **development** environment ([https://dev-api.aapc-nz.org](https://dev-api.aapc-nz.org)).
- Any changes pushed on the `main` branch will be deployed to the **production** environment ([https://api.aapc-nz.org](https://api.aapc-nz.org)).
- Any changes pushed to github on **any** branch will be deployed to Vercel Development Preview. This is not public.
- Any changes pushed on the `dev` branch will be deployed to the **development**
environment ([https://dev-api.aapc-nz.org](https://dev-api.aapc-nz.org)).
- Any changes pushed on the `main` branch will be deployed to the **production**
environment ([https://api.aapc-nz.org](https://api.aapc-nz.org)).

# Environments

### `LOCAL`
When running the backend locally, the `ENV` will be `LOCAL` and use the `MemoryRepository` with data from the local JSON files.

When running the backend locally, the `ENV` will be `LOCAL` and use the `MemoryRepository` with data from the local JSON
files.

### `DEV`
On [https://dev-api.aapc-nz.org](https://dev-api.aapc-nz.org) (the **development** environment), the `ENV` will be `DEV` and use the `MongoRepository` with data from the **Development** MongoDB Atlas cluster.

On [https://dev-api.aapc-nz.org](https://dev-api.aapc-nz.org) (the **development** environment), the `ENV` will be `DEV`
and use the `MongoRepository` with data from the **Development** MongoDB Atlas cluster.

### `PROD`
On [https://api.aapc-nz.org](https://api.aapc-nz.org) (the **production** environment), the `ENV` will be `PROD` and use the `MongoRepository` with data from the **Production** MongoDB Atlas cluster.

On [https://api.aapc-nz.org](https://api.aapc-nz.org) (the **production** environment), the `ENV` will be `PROD` and use
the `MongoRepository` with data from the **Production** MongoDB Atlas cluster.
Loading

0 comments on commit 19f47ba

Please sign in to comment.