Code Monkey home page Code Monkey logo

express-server's People

Contributors

adamd avatar

Watchers

 avatar  avatar  avatar

express-server's Issues

Set Up Your Environment

First, let’s install Node.js
We will be using an app called PostMan to test our API.

Node.js comes with something called NPM (Node Package Manager), that we will use manage our node modules. After the install is complete, check that you have both Node.js and NPM by running these commands in your terminal:

node -v
npm -v

You should get a version back from each of these commands, if it was correctly installed.
OK, now let’s create a folder and add some initial files by entering these commands in the terminal:

mkdir node-project
cd node-project
touch server.js middleware.js .gitignore

Next, we will initialize a package.json file, which will allow us to install and save node modules:

npm init -y
git init

Before we go any further, let’s add this line to our .gitignore file so we don’t track our node_modules if we are using git:

/node_modules

Alright, now we can install Express using npm. Enter this command in the terminal:npm install express --save

With that, your basic environment is set up. Check that you have these files:

-middleware.js
-node_modules
-.gitignore
-package-lock.json
-package.json
-server.js

Open your package.json file and make sure you have something like this under your dependencies:

"dependencies": {
    "express": "^4.17.1",
  }

The number on the right is the version you downloaded. Since we aren’t tracking the actual node_modules folder, this section is a reference used to re-install the modules your application depends on.

When you've finished, close this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.