Backend solution for the CrowdShelf platform
1.7K
Server for the CrowdShelf apps, written with NodeJS and Express.
We're using JIRA for issue tracking. We try to follow Chrockfords style guide for our code.
Do you want to contribute? Do it like this:
master with a name that starts with the JIRA task name, and is followed by a short description. For example cs-32-user-management-api.Any questions? Feel free to ask!
Get a local server by doing the following:
[email protected]:CrowdShelf/server.gitcd into the foldernpm install to install dependenciesMONGODB that defines its URL.MAILGUN_KEY and EMAIL_ADDRESS.npm start and you'll be up and running on port 3000, or an environment defined as PORT.server\
controllers\ - Controllers for handling requsts
models\ - Models that handle database-operations
index.js - Starts a server
server.js - Sets the server up, defines port etc.
router.js - Sets the routing up by setting allowed headers etc. and calling API setup-methods
The server is currently running on a droplet on Digital Ocean. It has CI with the master-branch. You'll find it on crowdshelf.xyz/api.
There's also CI on the dev-branch, which is the latest version of the API. You'll find it on crowdshelf-dev.herokuapp.com/api
A Docker-image is avaiable on the Docker Hub.
You can get it with docker pull crowdshelf/server, and run it with
docker run --net host -e "MONGODB=mongo://yourURL" -e "MAILGUN_KEY=your Mailgun API key" -e "EMAIL_ADDRESS=adress to send from" crowdshelf/servernpm start
The -e-parameter sets the environmental variables for your e-mail serivce and database.
This will expose the ports 3000locally, which means you can reach the API under localhost:3000/api.
You can also build the image yourself with docker build -t crowdshelf/server .
You can also spin everything up (app and MognoDB) with Docker Compose.
docker-compose.yml.docker-compose upLatest API definition can be found on our servers:
MIT-licence. See the LICENCE-file.
Content type
Image
Digest
sha256:3e23b43a4…
Size
255.2 MB
Last updated
over 10 years ago
docker pull crowdshelf/server