For info, see https://noam-honig.github.io/salmaz/en.html
git clone https://github.com/noam-honig/food-basket-delivery.git
duplicate the sample.env
to .env
and set the correct values in it in terms of google api keys etc....
npm install
npm run build
npm run start
When the application runs in production it uses just one server for both api and angular static pages.
When developing we run two servers:
- Api server that run on port 3000
- Angular dev server that run on port 4200
- we configure a proxy in the angular dev server to forward api calls to the api server, see
proxy.conf.json
- we configure a proxy in the angular dev server to forward api calls to the api server, see
- Run Task
ng-serve
to run angular cli development server (on port 4200) - Run Task
node-serve
to build and run thenode js
server. - Run the following script in postgres:
create extension if not exists pg_trgm with schema pg_catalog;
- Insert the first admin user:
insert into guest.helpers (id,name,phone,isadmin) values ('stam','noam','0507330590',true)
- Navigate to: http://localhost:4200/guest/login
- Click on the circle at the bottom left and type the admin phone number.
- Set the password you want
- click on create new environment and add environment (Either
test1
ortest2
or configure more in theproxy.conf.ts
file)
- if you need to debug something, run the
Attach to Running Node Server
debug configuration
When you run the application, you are prompted to enter a phone number and name. The first user that signs into a new environment is imprinted as it's admin.
After that you'll be asked to configure a password - and now you are the admin of this server.
You can create new environments for organizations by clicking the add environment button
The index file is changed on the fly as you run the application in production, according to the environment language and direction. For development purposes you can use the index_dev.html and change it to match what the language and direction you want to test at that time
To contribute to this repository please fork in and use pull requests.
For an excellent guide on how to do it, see Contribute to someone's repository