ArtiWave is a back-end blogging application developped with Express. It uses MongoDB as well as the Mongoose ORM. It has JWT authentication and allows you to perform CRUD operations on articles depending on your role.
- Install MongoDb Community Server as a service.
MongoDb Community Server download - Install Mongosh Shell.
MongoDb Shell download - Install MongoDb Compass.
MongoDb Compass download - Create database with Mongosh:
mongosh
use artiwave
db.createCollection("users")
db.createCollection("articles")
MongoDb create a database documentation
- Create an authentication
mongosh
use artiwave
db.createUser({ user: "Admin", pwd: "nimda", roles: [{ role: "readWrite", db: "artiwave" }] })
MongoDb create a user documentation
- Connexion to database
db.auth("Admin","nimda")
git clone
nvm install 20.10.0
npm install
cd api
mkdircd _certs
openssl genrsa -out pvt.pem 4096
openssl rsa -in pvt.pem -outform PEM -pubout -out pbl.pem
openssl rsa -check -in _certs/pvt.pem
make lf
If NVM is locally installed on your computer and you're not confident that you're on the required Node v20.10.0 LTS you could execute this command line =>
nvm use 20.10.0
Or check your version with =>
node -v
Then you could launch server with makefile =>
make dev
Otherwise with NPM
npm run dev
localhost:9001/api/swagger-doc
npm run test
npm run test:cov
chmod u+x sonar-server.sh
./sonar-server.sh
3. Open a browser and open the URL => http://localhost:9000
ProjectKey = ArtiWave
Replace token by the created one in scan.sh file
chmod u+x scan.sh
./scan.sh