This is the API backend project for the Portphilio project. This project uses Feathers. An open source web framework for building modern real-time applications.
If you would like to contribute to Portphilio development, here's how you can get the API up and running locally.
-
Install necessary software:
- NodeJS Please install the v10.x LTS version.
- MongoDB Community Edition
- Git
mkcert
- VSCode
- MongoDB Compass (optional, but nice for seeing what's in the DB)
-
Clone this repo to your local
dev
folder and install NPM dependencies:cd ~/dev git clone https://github.com/portphilio/portphilio_api.git cd portphilio_api npm install
-
Edit your
hosts
file (here's a tutorial) so you can use a "real" domain name on your dev server. Add the entry127.0.0.1 api.portphilio.test
-
Install a local SSL certificate in the root
portphilio_api
directory (command with example output)$ mkcert api.portphilio.test Using the local CA at "/Users/yourusername/Library/Application Support/mkcert" ✨ Created a new certificate valid for the following names 📜 - "api.portphilio.test" The certificate is at "./api.portphilio.test.pem" and the key at "./api.portphilio.test-key.pem" ✅
-
Create a new directory called
config
in the rootportphilio_api
folder. Inside it copy the three files that are in theprotected/config
directory of our shared Google Drive folder. If you don't have access to theprotected
folder, please contact Morgan. -
Run
npm install
from the root of the project in your terminal to install all of the dependencies. -
Start up the server by running
npm run dev:ngrok
from the terminal. This will not only startup the server, but also create a tunnel to the web using ngrok. You should see a random URL that looks likehttps://a837cf3.ngrok.io
show up as a terminal message. You'll need that URL for when you startup the frontend server.
Copyright (c) 2019 Morgan C. Benton
Licensed under the MIT license.