Code Monkey home page Code Monkey logo

pj-ecommerce-foraging-api's Introduction

Express Backend API

This Express backend API provides endpoints for interacting with various data related to an experiment or survey. It includes functionalities for retrieving initial data, complete results, and per-user results, as well as saving data from forms and user interactions.

Installation

To run this Express backend locally, follow these steps:

  1. Clone this repository.
  2. Navigate to the project directory.
  3. Install dependencies with npm install.
  4. Create a .env file in the root directory and add necessary environment variables if required.

Usage

To start the server, run npm start. The server will listen on the specified port (default is 5000).

Endpoints

Here are the available endpoints:

  • GET /versions: Get initial data.
  • GET /psform/:sex: Get form data based on gender.
  • GET /apptext/:sex: Get application text data based on gender.
  • GET /inituserdata/:version: Get initial user data based on version.
  • GET /bargains-result/:type: Get complete bargains result.
  • GET /bargains-result-per-store/:type: Get bargains result per store.
  • GET /survey-result/:type: Get complete survey result.
  • GET /demographic-result/:type: Get complete demographic result.
  • GET /memory-result/:type: Get complete memory task result.
  • GET /users: Get all users.
  • GET /participants-count-result: Get count of participants.
  • GET /bargains-result/:type/:userId: Get bargains result per user.
  • GET /bargains-result-per-store/:type/:userId: Get bargains result per store per user.
  • GET /survey-result/:type/:userId: Get survey result per user.
  • GET /demographic-result/:type/:userId: Get demographic result per user.
  • GET /memory-result/:type/:userId: Get memory task result per user.
  • GET /convert-short-stores: Convert short stores.
  • GET /convert-long-stores: Convert long stores.
  • GET /stores-long: Get long stores from file.
  • GET /stores-short: Get short stores from file.
  • POST /upload-stores: Upload stores data.
  • POST /psform: Create PS form data.
  • POST /visualpattern: Create visual pattern data.
  • POST /userinfo: Create user info data.
  • POST /userlogtime: Create user log time data.
  • POST /usergeneraldata: Create user general data.
  • POST /userbargain: Create user bargain data.

Configuration

You may need to set environment variables in a .env file for configuration. Common variables include:

  • PORT: The port on which the server will listen.
  • Other database-related variables if required.

Technologies Used

  • Node.js
  • Express.js
  • dotenv
  • cors
  • express-fileupload
  • compression

Contributing

Contributions to this project are currently not open to the public. However, if you are interested in collaborating or have inquiries about the project, please contact the project maintainers.

License

This project is licensed under the MIT License - see the LICENSE file for details.

pj-ecommerce-foraging-api's People

Contributors

manununhez avatar

Watchers

 avatar

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.