- Make sure you have Node > 7 and NPM > 4 installed globally.
- Make sure you have the AngularCLI > 1 installed globally.
- Make sure you have a MongoDB installed and an instance running with a directory in
/data/db
. - Make sure you run
npm install
in both~/
for the server and~/client
for the client.
- Start the server by running
npm start
while in~/
. - Start the client by running
npm start
while in~/client
. This start command will also append some params for proxying the server, so do not runng serve
because it will not proxy. - Go to http://localhost:4200
To run a build, go to ~/client
and run ng build --prod
. The artifacts will go in ~/client/dist
.
To start in production, make sure you run a build first, then just run npm start
in the server root to host the static build files and API. Go to http://localhost:8080 to see the app. You may want to run this app forever, so downloading PM2
will allow you to run the app as a service. Run pm2 start app.js
to start the app.
- Raspberry Pi 3
- Arduino Uno
- Temperature & Humidity Sensor
- Photoresistor
- Many resisitors/capacitors
Client built on Angular 4 / RxJs
API server built with Node, ExpressJS.
Routes:
- ANY
/api
- Welcome route, with info. - GET, POST, DELETE, PUT
/api/gardens
Data stored in MongoDB using Mongoose.
Task | Status |
---|---|
Client side interface | 100% |
Node CRUD API | 100% |
Pi Connection to Arduino | 0% |
Arduino Program | 0% |
Circuit | 20% |