Skip to content

hhharm/angular-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ANGULAR BACKEND SERVER

Backend for homework in Angular course

Run in Postman

Contents

Quick Start

Install dependencies:

npm install

Run server:

npm start

If it started successfully the following message will be shown {"level":"info","message":"Server started at http://localhost:3000","service":"angular-service"}

Upload file test

To test files uploading, run locally ./files/test.html. You can use LiveServer or any other tool

Configuration options

Configuration can be done by changing .env file

Port

You can change server port in SERVER_PORT variable

Data source

There are two options to start server: using mock data that is keeped in memory and using database. By default first variant is used.

If you want to use database:

  1. Install docker (Docker for Windows or any variant suitable for your OS)

  2. Start DB from prebuild image

docker run -p 6379:6379 --name redis-redisjson redislabs/rejson:latest`

you can also run DB in the cloud for free, see more here: https://oss.redis.com/redisjson/#redis-cloud

  1. Change
DATA_FROM_DB=true

in .env file

  1. Start server as usual

  2. For initial DB fill run while server is up

npm run fill-db

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published