GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - a-m-dev/NodeJs_Simple_Restful_API: Simple Standard NodeJs setup for Restful Api design

BranchesTags
Open more actions menu

Latest commit

 

History

14 Commits
14 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
.babelrc
.babelrc
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
docker-compose.yml
docker-compose.yml
 
 
nodemon.json
nodemon.json
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

nodejs_standard_setup

Simple Standard NodeJs setup for Restful Api design

boot up

make sure that mongo is runing on your machine on port 27017 or also you can pull docker image of mongodb and use that. for starting the project just run npm install first and npm run serve to spin up that on port :3010.

description

this is just a simple repo for you to see how nodejs basically sets up for a standard Restful API. in feature brances Jest will be added for testing. for now there are just couple of middlewares to handle a bit of error handeling and more importantly cors issues and response to OPTIONS method. also there is a resource called author that has controller as much as route and model.

build

you are using ESM mosules in the entire project, which enabels you to use import/export, async/await and many more features of ES6 in this project, so , in order to transpile that to regular js you need to run npm run build; this command would create a built folder in root directory and actually you can create a docker file to spins up a node js with an nginx and runs the content of that folder and there we go, you got your backend system!

also notice that in mongoConnect.js remember to change the connection string when you build and want to deploy, any changes in the docker-compose.yml file in order to improve the usablity would be appritiated to send some pull request to me!

About

Simple Standard NodeJs setup for Restful Api design

Topics

babelmongodbmongoosenodejsrest-api

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.