Repository for the Levi9 5 days in cloud challenge
Development OS for the app is a GNU/Linux Trisquel OS so it would be most simple to run it on a similar Unix type of system like Mac or Ubuntu. If you have a Windows machine I recomended using the shell that comes with git installation for Windows. It is recomended to have admin privileges. All code examples assume that you are using a compatible shell but you can do everything listed in GUI apps ( for using postgreSQL on Windows you have pgAdmin that comes with default installation, for git there is GitHub Desktop )
- git
- nodejs and npm (recomended version > 10.0)
- postgreSQL (recomended version > 8.0)
-
Clone the repository to your machine:
$ git clone https://github.com/mihna123/5-cloudy-dayz.git
-
Go to the repository folder ( replace with the actual url )
$ cd route/to/repo/5-cloudy-dayz
-
Install npm dependencies
$ npm install
-
Create a database using postgreSQL (documentation for that)
- Download PostgreSQL ( find apropriate installer for your sistem here )
- Setup your user name and password ( this is optional since we can use the default postgres user )
- Create a batabase
$ createdb <name-of-the-database>
-
Replace all environment values in the ".env" file since these values are used to access the database. The most important ones are
PGUSER (name of the user that can access the database - default is postgres)
PGPASSWORD (password for that user)
PGDATABASE (name of the database you created in step 4)
-
Run the npm start script:
$ npm start
-
The server is ready to listen to requests now
- Nodejs - used for the whole backend because of its simplicity
- Express - used for the REST api, very fast and good for development
- PostgreSQL - used for storing data, open source solution and very reliable