- Notifications
You must be signed in to change notification settings - Fork0
Backend Api for NepalToday Podcast app
NotificationsYou must be signed in to change notification settings
siristechnology/nepaltoday-podcast-api
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A graphql based api endpoint for NepalToday Podcast mobile app and Admin Dashboard in ReactIt is set to auto-deploy tohttps://dashboard.heroku.com/apps/nepaltoday-podcast-api-qa
- MongoDB
- Node 14+
yarn
--to install npm modules- Create .env file as per .env.sample file. Get actual values from Heroku env if you need to.
- Don't checkin .env file
yarn dev
--to start api-server and worker in development modeyarn start
--to start api-server and worker in prod modejest --runInBand -t 'some test description'
-- it will run tests withsome test description
init
descriptionyarn lint
--to show linting errors. Add [--fix
] to auto fix errors.
- Uses mongoose as ORM for mongodb
- Mongoose schema at /src/db-service/mongooseSchema.js
show dbs
--to show all dbsuse nepaltodaydb
--to switch to nepaltodaydbshow collections
--to show all collections/tablesdb.articles.find()
--to show all articles in the collectiondb.articles.find({title: 'new title'})
--to show article/articles with title = 'new title'db.articles.find({}, {title: 1})
--to show title field of all articles (no criteria)db.articles.remove({})
--to remove all articles documentsdb.articles.remove({title: 'new title'})
--to remove all articles with title = 'new title'db.articles.update({_id:{$exists:true}}, { $set: {createdDate: '2019-01-01'}}, {multi: true})
--to update multiple articles with createdDate = '2019-01-01'db.articles.find().sort({_id: -1}).limit(10)
-- to display latest articles (i.e order by descending and take 10 records)
- Run
kill-port 4000
to kill process in port 4000. kill-port is a npm module
About
Backend Api for NepalToday Podcast app
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Contributors12
Uh oh!
There was an error while loading.Please reload this page.