Giter Site home page Giter Site logo

gsa / gear2-nodejs Goto Github PK

View Code? Open in Web Editor NEW
4.0 13.0 5.0 71.66 MB

Integrating nodejs with the current GEAR project, as we transition to GEAR 2.0. Documentation available at: https://github.com/GSA/GEAR-Documentation. Production site: https://ea.gsa.gov

License: Apache License 2.0

JavaScript 16.87% HTML 81.95% CSS 1.16% Pug 0.02%

gear2-nodejs's Introduction

GEAR2-NodeJS

Installation

Prerequisites

Assumes you have NodeJS (with NPM) installed and appropriate MS SQL configuration params from the GEAR project admin (TBD).

Overview

  1. Clone the repository
  2. Install Node dependencies
  3. Configure the database connection
  4. Start the server

There are different branches for each environment:

  • Development - dev-server
  • Staging - stage-server
  • Production - master

This is to save separate server configurations for each server. Not the best solution but it's a workaround for now.

Steps

1. Clone the Repository

Start by cloning this repository into a preferred location on your computer.

git clone [email protected]:GSA/GEAR2-NodeJS.git

Once Git is finished, move into the new working directory.

cd GEAR2-NodeJS

2. Install Node Dependencies

From your working directory, run the npm install command. This will install all the dependencies listed in package.json.

npm install

3. Configure the Database Connection

The next step will be to configure the database connection. Before we can do that, we need to add a folder named .securables to the working directory. This will hold our config file.

mkdir .securables

Our Git repository is already configured to ignore that folder. This gives us a safe place to keep sensitive information such as passwords, tokens, etc.

Now that we have our .securables folder, we can add our configuration file and set up the database connection. Inside .securables/, create a new file named, gear-config.js.

touch .securables/gear-config.js

Then, open gear-config.js in your preferred code editor and paste the following JavaScript into it...

/* jshint node:true */

'use strict';

module.exports = {
   connection: {
            user: '',
            password: '',
            host: '',
            database: ''
        }
    }
};

After the JavaScript is pasted, add the appropriate values for userName, password, server, and database. You will need to get these from the project admin.

That should be all the information we need to connect to MS SQL, but if needed, other options and more detail can be found in the TediousJS documentation.

4. Start the Server

Finally, now that our database connection is configured, we can test the server.

npm start

Testing

If the server starts up without error, you can try opening the following URL to test the database connection.

http://localhost:3000/api/v0/applications

That URL should respond with a JSON file whose first property is "status":200

gear2-nodejs's People

Contributors

aliang-gsa avatar ccampbell-gsa avatar dodsonm avatar hatfieldjm4 avatar littlemeow avatar mpratt0123 avatar phil-trinh avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mpratt0123

gear2-nodejs's Issues

Organization updates

User updates requested:

  • Delete ICEA
  • Create ICEL
  • Delete ICC and its child, ICCB

Update IDR organization in GEAR's organization chart

  • Remove references to IDRG and IDRM.
  • Add IDRVA and IDRVB with parent references.
  • Ensure that all dependencies and lookup tables now point to the updated org.
  • Confirm that the correct orgs are showing in the production org chart

Upgrade to Google Analytics 4

Google Analytics 4 is our next-generation measurement solution, and is replacing Universal Analytics. On July 1, 2023, Universal Analytics properties will stop processing new hits. If you still rely on Universal Analytics, we recommend that you complete your move to Google Analytics 4.

MANAGE YOUR GOOGLE ANALYTICS 4 SETUP

You've already created a Google Analytics 4 property. Now's the time to ensure that your setup is complete. If you haven't started collecting data in your Google Analytics 4 property, you should do so now. This will allow you to gather the historical insights you need to measure your results over time when Universal Analytics stops processing hits. If you are already collecting the data you need in Google Analytics 4, you should ensure your remaining setup is complete.

You can continue to use and collect new data in your Universal Analytics properties until July 1, 2023. After that, you will be able to access your previously processed data in Universal Analytics for a period of at least six months. We know your data is important to you and we strongly encourage you to export your historical reports during this time.

In the coming months, we will provide a future date for when we will fully sunset Universal Analytics. On this sunset date, you will no longer be able to see your Universal Analytics reports in the Analytics interface or access your Universal Analytics data via the API.

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.