E-commerce application backend written with nodejs and typescript, and uses MongoDB as the primary database.
Application stack and technologies overview.
- Language: NodeJS (Typescript)
- Database: MongoDB
- BLOB Storage: Google Cloud Storage
- Cloud Hosting: Render
The set of defined endpoints the API listens for.
- GET
/
- GET
/products
- GET
/product/single?id=someID
- POST
/auth/sign-in
- POST
/auth/sign-up
Endpoint documentation here
To quickly bootstrap the project on your machine, follow these commands.
-
Clone the github repo:
git clone https://github.com/dev-xero/molla-backend
-
Install dependencies:
cd molla-backend yarn install
-
Run the development server:
Running
yarn dev
watches the typescript files for changes and restarts the server automatically, to instead run the compiled JavaScript code, useyarn build:run
.yarn dev
The server depends on environment variables, which are loaded from a .env
file in your root directory, and example .env file is present, showing the required variables.
You can get the Google service key from the Cloud Console and save it to the root directory as key.json
. Without this step the server will crash when attempting to connect to the bucket store.